Home » Support » Forum » Puzzler: Not getting cascades on read from Spring context

Puzzler: Not getting cascades on read from Spring context

#1

I've determined that the database is correctly initialized, looking at it from the Object Explorer, I can run the code that loads the database in a Junit test and it's initializing the children objects correctly, but in the application running in Jetty with Spring, fetching is not cascading. My best guess is that perhaps I have something misconfigured in my persistence.xml or my context. 

 

-dh

#2

Fetching doesn't work by default for detached objects.

Please read see this issue and as a workaround you may try setting objectdb.temp.no-detach.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

Would it make sense to call entityManager.merge(o) for each of the objects returned to get the child objects?

-dh

#4

It would be better and more efficient, if possible, to arrange fetching of the relevant data before detachment.

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

Post Reply

To post a reply and/or subscribe to update notifications - please login