Hibernate - get all entites created in cascade creation

If I have an entity with a parent / child relationship (and Cascade = CascadeType.ALL) and is called:

getSession().save(parent)

      

the parent's primary key is returned.

Is there a way to access the primary key of the generated child?

Hello

Marty

+2


source to share


1 answer


The object itself must have it. If not, try calling Session.flush () first.



+3


source







All Articles