IntelliJ problem when mapping JPA entities

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:

CREATE TABLE dbo.ECF (
  ID_EMPRESA int NOT NULL,
  ID_CAIXA int NOT NULL,
  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'),
  PRIMARY KEY (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?

3 comments

Hello.

This is not configurable. Actually, the following bug should just be fixed: http://youtrack.jetbrains.com/issue/IDEA-79437 (I see you've already voted for it).

Regards,
Alexander.

0

Thanks Alexander,

Do you have forecast when this bug will be fixed?
I'm using version 12.0.4 and it still have this bug.

0

No certain estimations. But I've just reminded the case to the developer. The decision is up to him.

Alexander.

0

Please sign in to leave a comment.