Start Session saveorupdate not updating

Session saveorupdate not updating

Hibernate Session is the interface between java application and hibernate framework.

I've got a Parent/Child relationship declared in my hibernate mappings. When I create and save a new parent that contains new child objects, I get an error: I thought adding the join information in the child mapping would let hibernate know to get the LIST_ID from the parent object ACCESS_LIST. I get the error upon executing this code: I do not want to have to manually set the LIST_ID on each of the objects in the Access List Members collection on Access List.

I've gone through the JBOSS documentation but I think I have misunderstood how the one-to-many and many-to-one relationships work.

As the method name suggests, hibernate save() can be used to save entity to database.

We can invoke this method outside a transaction, that’s why I don’t like this method to save data.

It is a old, mystic and dangerous knowledge to use transactions by yourself.

I saw programmers must use transactions because they had to use transactional savepoints, if it is your case, have fun.

Hibernate has no way of knowing that the Bills are the same person.