hibernate composite key

Hibernate needs to be able to compare and serialize identifiers. So the identifier class must be serializable, and override hashCode() and equals() consistently with the database’s notion of composite key equality. If you have a composite id mapped as properties of the entity, the entity itself is the identifier. A second approach is called a … Read more

JPA (Hibernate) and custom table prefixes

One way to rename all tables at once, is to implement your own namingStrategy (implementation of org.hibernate.cfg.NamingStrategy). The NamingStrategy used is specified within persistence.xml by <property name=”hibernate.ejb.naming_strategy” value=”com.example.MyNamingStrategy” />

JPA Uppercase table names

maybe because you are using MYSQL5DIALECT there’s a Postgres Dialect just used post it like this and for the improved naming strategy use EJB3 like Spring boot JPA insert in TABLE with uppercase name with Hibernate spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect hope it works for you

Hibernate, Postgres & Array Type

I tried few versions based on Array Type introduced by JDBC4 : How can I set a String[] parameter to a native query?. Problem is also Hibernate (even in last version 4.3.1.final) does not work with this new features and gave me following error message Could not determine a type for class: org.postgresql.jdbc4.Jdbc4Array So I … Read more