Digest for jooq-user@googlegroups.com - 1 update in 1 topic

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Digest for jooq-user@googlegroups.com - 1 update in 1 topic

http://groups.google.com/group/jooq-user/topics mailing list
"Jens Teglhus Møller" <[hidden email]>: Sep 25 04:15AM -0700

Ok, after spending some time in the debugger I found out that it is related
to useAttributeConverters. If set to true (it is by default), the schema
hibernate generation is run twice once with
the hibernate.physical_naming_strategy set and once without.
 
from JPADatabase line 179 to 183:
 
export.create(EnumSet.of(TargetType.DATABASE), metadata.buildMetadata());
 
if (useAttributeConverters)
loadAttributeConverters(metadata.getAnnotatedClasses());
 
 
Hibernate creates the tables in both line 179 & 183.
 
I'm not sure if that is a bug or a feature, but I can see that the
AttributeConverterExtracter class defines its own hibernate properties:
 
private final Properties properties() {
Properties properties = new Properties();
properties.put("hibernate.dialect", JPADatabase.HIBERNATE_DIALECT);
properties.put("hibernate.hbm2ddl.auto", "create-drop");
return properties;
}
 
 
So tables are created again without the wanted naming strategy.
 
If I set useAttributeConverters to false it only generates tables once with
the expected naming strategy.
 
Best regards Jens
 
On Tuesday, September 24, 2019 at 2:43:23 PM UTC+2, Jens Teglhus Møller
wrote:
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].