Hi

I'm trying to get schema generation using JPADatabase to work with spring 
boot.

In my initial testing I got everything working to the point where there was 
a mismatch with the table names when executing queries (generator not using 
same naming strategy as spring app).

I have a 3 module maven setup with jpa-model, jooq-model and spring-app 
(simplified example can be seen here: 
https://github.com/djarnis73/jooq-spring-jpa-example).

I saw the documentation regarding 
setting 
hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
 
but when i do that the code generator fails since it cannot find the class.

[ERROR] Failed to execute goal org.jooq:jooq-codegen-maven:3.12.1:generate 
(default) on project jooq-model: Error running jOOQ code generation tool: 
Error while exporting schema: Unable to resolve name 
[org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy] 
as strategy [org.hibernate.boot.model.naming.PhysicalNamingStrategy]: 
Unable to load class 
[org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy]: 
Could not load requested class : 
org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy -> 
[Help 1]

I tried adding

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>${spring.boot.version}</version>
</dependency>

I also tried adding the dependency several other places, but I think it 
should be a plugin dependency.

I have verified that 
org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy is 
in the org.springframework.boot:spring-boot jar file

And when running maven with -X i get the following:

[DEBUG] Populating class realm plugin>org.jooq:jooq-codegen-maven:3.12.1
[DEBUG]   Included: org.jooq:jooq-codegen-maven:jar:3.12.1
[DEBUG]   Included: org.springframework.boot:spring-boot:jar:2.1.8.RELEASE
(others removed for brevity)

I'm testing with jooq 3.12.1, spring boot 2.1.8.RELEASE

I have not been able to get it working, can anyone give me a hint or point 
me to a working example.

Best regards Jens

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/ffef98dc-c1df-4191-9397-6825c63c54cc%40googlegroups.com.

Reply via email to