Welcome to the Hibernate community newsletter in which we share blog posts, forum, and StackOverflow questions that are especially relevant to our users.
Articles
Sanne Grinovero and John Griffin have worked on the Getting Started with Hibernate Search RefCard on DZone. Check out the PDF version which is even more detailed than the web version.
If you want to customize the JOIN clause of an entity association, you can use the Hibernate @JoinFormula
annotation,
as explained in this article.
There are multiple ways to delete a JPA entity, as illustrated in this article on Baeldung.
Thorben Janssen wrote a Getting Started article for Hibernate Envers and another one about querying audit log entries.
Dimo Velev gives a very detailed explanation of why Class.forName
can cause lock contention.
The HHH-4959 was affecting both JPQL and Criteria API entity queries,
and the fix will be available starting from Hibernate ORM 5.2.6.
If you want to use Hibernate ORM with SQL Server, then you should read this article. There are plenty of tips related to optimal data access patterns and indexing considerations.
Jakub Kubrynski explains why you should care about equals and hashCode, especially when dealing with JPA entities.
SQL injection attacks are real, and HQL and JPQL queries can be vulnerable to SQL Injection if String concatenation is being used.
Questions and answers
-
Considering a given database schema, is it necessary to define JPA or Hibernate Mappings?
-
Create JPA
EntityManager
withoutpersistence.xml
configuration file -
Hibernate obtains multiple JDBC Connections from the pool during a JTA transaction
-
HibernateException: Couldn’t obtain transaction-synchronized Session for current thread
-
Difference between
hibernate.jdbc.fetch_size
and batch fetch strategy@BatchSize
-
org.hibernate.LazyInitializationException
- could not initialize proxy - no Session -
Do JPA entities and DTOs belong to Service or Spring Repository layer?
-
How to persist a Hibernate child entity without loading the parent-side Set collection?