row « Batch « JPA Q&A





1. JPA: add should not fail if one of the rows cant be added    stackoverflow.com

I use JPA + Hibernate. I have 2 entities (Parent, Child) with OneToMany connection between them. I add a list of children to the parent like this:

parent.setChildrent(childrenSet);
getEntityManager().merge(parent);
If one of the children entities ...