how to select parent/collection of child entity in one query to avoid N+1 on child entity
My entities as below
A bidirectional one-to-one association on a foreign key is common with many-to-one issue
[tag:`XML Approach <class name=”Campaign”> <id name=”id” column=”cmp_num”> </id> <one-to-one name=”person” property-ref=”address” cascade=”all”/> </class> <class name=”MopChangeDocData”> <id name=”id” column=”mop_cd_data_id”> </id> <many-to-one name=”campaign” column=”cmp_id” unique=”true”/> </class> Table mop_change_doc_data With the xml approach application works fine and generates the expected data but with the annotation approach it does not fetching the data. Annotation Classes @Entity @Table(name=”parent_cmp”) public class […]
Hibernate, not persist associated entities
Is it possible to not persist associated entities?
How to persist OneToOne self referencing entity with JoinTable
I’m having the following problem:
Hibernate exception HHH000400 Exception in thread “main” org.hibernate.AnnotationException:
Hi I am using the following code :
Hibernate 6 disallowed batchsize on lazily loaded ManyToOne association?
Before hibernate 6 we had mapped fields like this(or without insertable/updatable=false). The reason for it was to avoid N+1 problem, and as far as I remember this was actually working. The field was lazily initilized without N+1 problem.
Which version is long term support version for Hibernate ORM version 5? 5.3 or 5.6?
Our Hibernate ORM version is 5.5, but 5.5 is EOL now, we want change to another Non-EOL version, seems only 5.3 and 5.6 support JAVA 8, both 5.3 and 5.6 are limited-support version, the recent update on version 5.3 at 2024-02-08, but the recent update on version 5.6 at 2023-02-06, not sure which version will EOL firstly.
Hibernate @UniqueConstraint generates unexpected unique constraint on each column defined
With the Entity definition at the bottom, I am expecting only one unique constraint should be generated
Hibernate try to set my id field to the current object, what am I doing wrong?
I searched for a long time but I cannot understand what I am doing wrong here.
Cannot find annotation method … in type ‘kotlin.Metadata’ after hibernate upgrade
After upgrading to hibernate 6 I see in logs following, while I don’t use kotlin. Can anyone advice, what is this and how to fix that?