i never thought this would be related. Does that mean that the set does not manage anymore the relation? If yes, that mean i am not allowed to do this anymore:
Code:
p1.getWatchedWorkflows().add(new WatchedWorkflow());
s.saveOrUpdate(p1);
s.flush();
because the profileID of workflowwatch table would not be initialized.
This is not a problem in this specific case (we are managing at bean level a 2 ways relationship, with a protected field and a bit of code, we can have the add() issue a w.setProfile()), but it becomes a problem if i have moev to a one way relationship profile
Code:
(1)------->(0..n) workflowWatch
Not all our relationships are two way, and we would like hibernate to delete orphans without first updating them (which is a non-sense), without using inverse because the collection is the "owner" of the foreign key.
thnaks for your help (and patience)
edit: using an unidirectional one-to-many relationship with a join table seems to do the trick too.