Hibernate Found shared references to a collection error
I’m having an issue with a List(or set I tried both) in my ecommerce website where I try to add a List of Jewelry(called CartJewelry in my code) that are in the Cart entity to the Order entity and I keep getting this error Caused by: org.hibernate.HibernateException: Found shared references to a collection: com.batavia.ecommerce.model.ClientOrder.cartJewelryItems
. I know it’s specifically that list cause when I don’t pass it to the order entity it saves without an issue.
How to avoid infinite recursion with bidirectional relationships in JPQL Query using Hibernate
I have three entities with relationships:
BlazeJPAQuery innerJoin(SubQueryExpression, Path) throws SyntaxException when I use .limit() in SubQueryExpression
I have encountered an error when I use BlazeJPAQuery innerJoin(SubQueryExpression, Path). My subquery expression tries to use .limit to limit the results. However, when I run the application, it throws an error as below:
Caused by: org.hibernate.query.SyntaxException: At 1:1305 and token ‘LIMIT’, no viable alternative at input ‘SELECT……’.
Pass String[] as text[] to NamedNativeQuery in Hibernate 5.6
I have a Postgres function with this signature: