dharmendra.pandey wrote:
Hi alexmarshall
Plz.. check in code that any collection which has child of parent ,have you assign to some other parent object.Might be some non session object.
Hi Dharmendra,
The collection itself is only assigned to one particular instance of an Agent. The roles themselves can (and do) exist in the 'roles' collections of other Agent instances.
I just realized that my Agent class was left as mutable="false" (this was done for a good reason a long time ago and I had missed that). Even after setting mutable="true" I now have the scenario where hibernate's just not updating the relation. It's a unidirectional many-to-many association. It needs to be unidirectional because there are numerous other classes that also use the role class. I've tried using numerous permutations of the settings (cascade, cache-usage, inverse) and none of them have worked. (Yeah, I'm at the point where brute-force settings changes are around). Is there any insight you or anybody else could offer ? I'd really appreciate it. Thank you very much for your response though.