IDEA 2016.2.1 Hibernate persistence mapping wizard not mapping UUID correctly from PostgreSQL 9.5 instance

Answered

I'm using latest version of IDEA Ultimate 2016.2.1 (downloaded on August 5) and while attempting to generate a Hibernate persistence mapping, the Import Database Schema wizard is flagging all UUID data types as errors, "'Basic' attribute type should not be 'Object'".

I can work around the issue painfully by selecting java.io.Serializable as the alternate type, generating the mapping, and manually replacing all affected field types back to UUID.  However, I'm not certain if this is the best way to work around the problem.

There were earlier problems with the wizard dealing with nvarchar and other PostgreSQL types.  Was the UUID tested?

Thanks in advance.

1 comment
Comment actions Permalink

Hi Anthony,

Currently Generate Persistence Mapping feature does not have precise mapping for every possible Database type to Java type, so if the type is unknown the error is shown. There is a request to make default mapping configurable for the user to workaround this https://youtrack.jetbrains.com/issue/IDEA-144763 . Feel free to vote and follow this issue for progress.

0

Please sign in to leave a comment.