Java serialization of EJB entity not serializing one member of ManyToMany set - but only sometimes?

In case anyone is interested: I haven't found an answer to the question. I suspect it has something to do with the way the linked Group objects are stored in a bernate PersistentSet (although PersistentSet and the HashSet backing it are both serializable). I have given up on debugging - time is money.

I worked around the problem by adding an additional field to my User entity, Set groupIds. I fill up this set in User. WriteObject, which is called when User is serialized.

On the receiving side, I clear out the groups set, and then manually search for the groups based on the IDs stored in the groupIds field. I then add the groups to the user's group set. It's cumbersome, and it requires that I have first synchronized the groups in order to be able to reassign them - but it works.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions