one-to-many on non-persistent objects in Java

0
Hi there   I couldn't find the answer on the forum neither in the doc I have 2 non-persistent objects (let's say Company and Employee ; an Employee is linked to a Company, a Company has multiple Employees) In Java : from a Company object, how can I retrieve the Employee list ?   thanks
asked
1 answers
1

Hey Francois,

You need to use retrieveByPath, but you need to make sure your non-persistent objects are in cache.

https://apidocs.rnd.mendix.com/9/runtime/com/mendix/core/Core.html#retrieveByPath(com.mendix.systemwideinterfaces.core.IContext,com.mendix.systemwideinterfaces.core.IMendixObject,java.lang.String)

Similar question: https://community.mendix.com/link/space/microflows/questions/131035

Best regards, Slavko

answered