extensions/hibernate-orm/deployment/src/main/resources/META-INF/quarkus-skill.md
@Entity from jakarta.persistence.@Id with @GeneratedValue for primary keys.@Column, @Table, @ManyToOne, @OneToMany, etc. for mapping.quarkus-hibernate-orm-panache) for simplified data access.Session to EntityManager, unless specifically instructed to follow standards.StatelessSession for simple CRUD scenarios, and Session for more involved business methods. Avoid mixing the two in a single transaction.Session or StatelessSession with @Inject.session.persist(), session.find(), session.remove() or statelessSession.insert(), statelessSession.get(), statelessSession.update(), statelessSession.delete() for CRUD.session.merge() only if a REST endpoint is accepting a serialized entity as input.session.createSelectionQuery() or @NamedQuery for JPQL queries. If Jakarta Data is in the classpath, use that in priority for static queries — especially if they are used from multiple places.session.createSelectionQuery("select ...", MyDTO.class).@Transactional (from jakarta.transaction).@Transactional on the service/boundary layer, NOT on entities or repositories.quarkus.hibernate-orm.schema-management.strategy=drop-and-create for schema generation. If using dev services, this is set automatically by Quarkus. Note: the legacy property quarkus.hibernate-orm.database.generation still works but is deprecated — always use schema-management.strategy.@QuarkusTest — Dev Services provides a test database automatically.@TestTransaction to auto-rollback database changes after each test.Session/StatelessSession in tests for direct database assertions.@Transactional on private methods — CDI proxies cannot intercept them.quarkus.datasource.db-kind for the default datasource if there are multiple JDBC drivers or Vert.x SQL client extensions in the classpath.quarkus.datasource."my-datasource".db-kind for named datasources; this ensures the datasource is detected by Quarkus at build time.