I have a ReleaseDBO which has a list of RequirementDBOs. When two users(in two different hibernate sessions) add a RequirementDBO, it has code like so.....
release.addRequirement(req); //this in turn also calls req.setRelease
//updating the other end of the association
session.merge(req);
There is a requirements table where this requirement would get added and the release id would be set in the foreign key release column.
This code works great except when two users use it. I would really like to add the second users requirement too. His requirement is not stale...his release might be stale because it doesn't contain the requirement just added in the other session, but I don't really care and neither does my user in this case. How can I work around this problem so the users data is committed.
thanks,
dean
|