ObjectDB ObjectDB

Unable to update a OneToMany Set


Hi there. I'm almost new on this. I think it is not a bug, but something im doing wrong, any way i can not figure out what it is, even on a simple test program... So I post it here.

I attach the Test.java file.

I don't get any error, I just can't make company.users List to point any user. I can add users and companys, but I can't get that relationship working... I also attach a cap of the explorer view.

Hope can help me. Thanks in advice. Byee ;)


By closing the EntityManager after every operation your Company instance becomes detached. A detached entity object does not track changes. This is explained in chapter 3 of the manual.

ObjectDB Support

Thank you men. Sorry for the stupid question.

All I needed to do is a em.merge(company) once added the user to the company to attach it again...



To post on this website please sign in.