JPA Buddy's reverse engineering feature not showing already mapped entities

169 Views Asked by At

I am trying to use JPA Buddy's reverse engineering feature to create JPA entities from a pre-existing schema. The problem is that there are entities that have already been created manually that map to tables but JPA buddy doesn't believe they have been mapped yet. It seems to think that if the entity class name is named in pascal case that it maps to snake case in the db even though in our default.properties we have a line which from my understanding should use the naming convention that converts "LikeThis" to "likethis":

spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

I've tried explicitly setting a @Table annotation:

@Entity
@Table(name = "likethis")
public class LikeThis {
...
}

This works but it seems unnecessary that i would need to add a @Table annotation for all of these entities since when running the application it is able to map to the correct table. Any advice is appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

You can set the PhysicalNamingStrategyStandardImpl for JPA Buddy as well explicitly. To do this, open Preferences | Tools | JPA Buddy | Database Versioning and select PhysicalNamingStrategyStandardImpl from the dropdown menu.

enter image description here