Best practice around resolving mxObject reference attribute in a widget ?

5
I have a widgetFile that takes an entity and an object/list of attributes(pathType='reference'). I want to retrieve these references for every MxObject I get after calling mx.processor.get for the entity. Some confusion I have around the docs: http://apidocs.mendix.com/client/mxobject.html "XPath queries can be performed with a depth level. If this level is greater than 0 the references that each MxObject contains are filled with the MxObjects of the references (up to the depth level)." On that same link there is a reference guide to 'mx.processor', where its 'get' method does not have a depth argument, but on the following link it does https://world.mendix.com/pages/releaseview.action?pageId=12747441. (1) Is the depth property deprecated ? I tried adding "filter : {depth : 1}" to my mx.proccesor.get() call, which results in an error ("Unable to load xas/#retrievebyxpath status:560"), I do get a result if I take the filter property out. (2) Is there a way to retrieve the reference such that it places the reference(MxObject) within the entity that it refers to, or do I have to keep a map of it myself ? (3) A small sample of (pseudo) code or suggestion (or some doc I am not reading right) of how one would get all references (by GUID if necessary) for all attributes in the attributes object/list would be appreciated. Any conventions or insights appreciated.
asked
1 answers
2

GetEverything function. We've recently created this one to catch all the retrieve cases.

answered