Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

IntelliJ problem when mapping JPA entities

$
0
0

Hi there, since IntelliJ version 11 I have some dificulties to create JPA entities based on database schema. I've updated to version 12 but I still have dificulties, as you can see.

 

My database is Microsoft SQL Server 2008 Express Edition, and the problem only happens when a column in database is of nvarchar() type:

 

CREATETABLE dbo.ECF (  ID_EMPRESA intNOTNULL,  ID_CAIXA intNOTNULL,  NUM_TERMINAL nvarchar(50),  NUM_SERIE_ECF nvarchar(50),  TIPO_ECF nvarchar(20),  MODELO_ECF nvarchar(50),  MARCA_ECF nvarchar(50),  STATUS_ECF nvarchar(2) DEFAULT (N'AB'),  PRIMARYKEY (ID_CAIXA, ID_EMPRESA)
);

 

this is the print of intelliJ:

 

problema intellij.png

 

as you can see, all columns of nvachar() type are mapped to java.lang.Object instead of java.lang.String.

Sometimes I have a lot of JPA entities to create and the only way in this case is mannually change all Object to String, so I'm forced to use Netbeans to not change it manually...

Is there a way I can instruct IntelliJ to use java.lang.String when it find nvarchar() type?


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>