Cannot create sequence with Jakarta/ Hibernate native query using named parameters
I need to dynamically create new sequences in my database but for some reason it’s just not working when I use parameters (named or ordinal). My code for this is quite simple (em
= jakarta.persistence.EntityManager
)
JPA relationShip ManyToOne from embedded to embeddable
I have next class embeddable:
How can I make Hibernate schedule insertions in the correct order with two Many-to-one relationships?
In my code, I have (don’t worry about business logic, it’s an example) Agreggate School:
Native Query issues Upgrading from JPA 2.2 to JPA 3.1
I am upgrading Hibernate 5.16 using JPA 2.2 to Hibernate 6.5.2 using JPA 3.1.
During start up it is now validating all the Named Queries which I am sure it never did before – it seems to be treating the results of SQL functions as a java.Objects so I had a query below
which it objected to with this error
Referencing a JPA entity with an id instead of a Java reference
Is it possible to reference another JPA entity with an id
instead of a Java reference?
Hibernate @UpdateTimestamp not change in cascade manner
I have this Hibernate Dao classes.
Inconsistent orphan removal on ManyToMany with CascadeType.ALL
Hibernate 6 does not cascade REMOVE operation with @ManyToMany(cascade = CascadeType.ALL)
most of the time (due to BasicCollectionPersister.isCascadeDeleteEnabled
always returning false
) but seems to do so on that same collection mapped with @ManyToMany
if cascading is started with an entity containing @OneToMany
with orphanRemoval = true
. Is this intended behavior?
@OneToMany with mappedBy referencing id property of a basic type instead of @ManyToOne association
Given Hibernate 6.4.4 and the following entities:
Hibernate session.merge() an object graph, but ID of an inserted object does not get returned
I have an object tree where in this particular case, the parent object exists, and a one to many set of children has one child already. Then the user adds another child and updates the parent. In code, I am functionally calling session.merge(parent).