Hibernate onetomany not updating
I have an API which should update the list of accounts with clients. I configured @One To Many as indicated for proper update: What I want to do on the data presented.
I already have a client (id = 100) with two accounts (id = 10, 11).
As for updating child objects, the dirty checking mechanism works just fine even if you don’t use a managed collection.
After doing so all appears to save / update fine but upon checking the child_table in the db, these changes have not been saved / updated. If I understand correctly, you're modifying a field which is part of the primary key of your entity. My advice is to follow the good practices: use a non-composite, purely technical, auto-generated primary key.
I believe this has something to do with the mappings of the map in the Parent class but can't seem to figure it out.
Exception Converter Impl.convert Commit Exception(Exception Converter Impl.java:75) at org.hibernate.engine.transaction.internal.
Transaction Impl.commit(Transaction Impl.java:71) at org.jpa. Jpa Transaction Commit(Jpa Transaction Manager.java:517) ... 153 common frames omitted Caused by: javax.validation.What’s nice about using a query is that you can paginate it any way you like so that, if the number of child entities grows with time, the application performance is not going to be affected.