Problems upgrading from 3.0.6 to 3.1.0

22 views
Skip to first unread message

Ic80

unread,
May 18, 2015, 1:36:38 PM5/18/15
to sculptor...@googlegroups.com

Hi,
we've been using sculptor with JPA/Hibernate for our project with version 3.0.6 and we tried upgrading sculptor (and all related libraries) to 3.1.0, but we met some problems, that can be summarized in the missing annotations @Type and @Enumerated in the generated domain classes, Even with a custom type declared in the sculptor-generator.properties (with the respective javaType and hibernateType entries) that was working in 3.0.6 now we're missing the @Type annotation from the generated property. We fixed the @Type problem by declaring a @TypeDef annotation at the package level, but now we are suffering from the problem with enums, with our database with data stored as strings but the updated generated domain classes that tries to query and save them as enum ordinals. Is there something we missed when we upgraded sculptor? We just changed the sculptor and related libraries versions in the pom.xml and rebuilt the generated code (and fixed the following problems with upgraded spring and hibernate mostly).

Thanks for your help.

Torsten Juergeleit

unread,
May 18, 2015, 2:00:35 PM5/18/15
to sculptor...@googlegroups.com, santo....@gmail.com
With Sculptor 3.1 the support of JPA1 was dropped and Hibernate 4.2 (JPA 2) is required now.
So the following settings are not supported anymore:

jpa.provider=hibernate3
jpa.version=1.0

Please check your "jpa.provider" setting and remove the obsolete "jpa.version".

/Torsten

Torsten Juergeleit

unread,
May 18, 2015, 6:48:27 PM5/18/15
to sculptor...@googlegroups.com, torsten.j...@gmail.com, santo....@gmail.com
I can reproduce this issue: If using any any kind of unsupported JPA provider (like "jpa.provider=unknown") and enums with an attribute marked as "key" then no provider-specific annotations (like Hibernates @Type) are generated for the domain objects corresponding enum attributes.

It seems we need some kind of validation for the provided value of the "jpa.provider" property.

/Torsten

Ic80

unread,
May 19, 2015, 3:57:29 AM5/19/15
to sculptor...@googlegroups.com
Thank you, the problem was in the configuration that was still using hibernate3.
Reply all
Reply to author
Forward
0 new messages