Hibernate – OneToOne, OneToMany, ManyToOne, ManyToMany mappings

By specifying the @JoinColumn on both models you don’t have a two way relationship. mappedby One to One

bidirectional One to One is EAGER @MapsId (before jpa2 – @PrimaryKeyJoinColumn)

One To Many, Many To One Unidirectional without @JoinColumn requires additional table for joining


Is it possible to limit the […]

Hibernate – JPA

SessionFactory (jpa: EntityManagerFactory) – thread-safe (and immutable) representation of the mapping of the application domain model to a database Session (jpa: EntityManager) – A single-threaded, short-lived object conceptually modeling a “Unit of Work” StatelessSession – like JDBC Transaction (jpa: EntityTransaction) – A single-threaded, short-lived object used by the application to demarcate individual physical transaction […]

XA transaction implementation: JTA – Java Transaction API

JTA – Java Transaction API | ACID | Two-phase commit | Three-phase commit XA-compliant javax.transaction javax.transaction.xa javax.transaction.TransactionManager javax.transaction.UserTransaction javax.transaction.xa.XAResource UserTransaction.begin() – start transaction associated to thread @Transactional @TransactionScoped https://www.progress.com/tutorials/jdbc/understanding-jta