Why do I need to configure the SQL dialect of a data source?

Dialect means “the variant of a language”. Hibernate, as we know, is database agnostic. It can work with different databases. However, databases have proprietary extensions/native SQL variations, and set/sub-set of SQL standard implementations. Therefore at some point hibernate has to use database specific SQL. Hibernate uses “dialect” configuration to know which database you are using … Read more

The JPA hashCode() / equals() dilemma

Read this very nice article on the subject: Don’t Let Hibernate Steal Your Identity. The conclusion of the article goes like this: Object identity is deceptively hard to implement correctly when objects are persisted to a database. However, the problems stem entirely from allowing objects to exist without an id before they are saved. We … Read more