ObjectDB ObjectDB

Retrieval by Access bug?

#1

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.

edit
delete
#2

There are no known open bugs in ObjectDB that may cause this, but we cannot exclude the possibility that there may be an issue on a specific scenario, and this has not been revealed or reported yet.

Can you reproduce the issue with a test case?

Note that you should enhance all your classes. Partial enhancement is not supported. In addition, if you use reflection mode (i.e. no enhancement) you should try enhancing your classes, since enhancement improves ObjectDB ability to fetch objects when needed.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
edit
delete

Reply

To post on this website please sign in.