Dear Sirs,
I have an object A, that has a OneToMany FetchType.EAGER List of objects B, that has a field with a reference to an object C.
I have this code:
ClassA objectA = em.find(ClassA.class, 1); for (ClassB objectB : objectA.getListB()) { ClassC objectC = objectB.getObjectC(); }
em is an open Entity Manager with a running transaction.
Almost all the time that I use that code, I received a managed objectC reference, I can modify objectC, and it is updated when I commit the transaction without any problem.
But sometimes not, I receive an unmanaged copy of objectC, and I cant find any reason for that.
Could be any bug in ObjectDB when I retrieve by navigation a field from a collection?
Thanks in advance.
Pablo.