Hi
Is there a way to expand a specific proxyList using GetManager.Find< > ?
Currently I'm using
TXDataOperationContext.Current.GetManager.ProxyListLoadDepth := 1; // or 2 or more
TXDataOperationContext.Current.GetManager.Find<TObject>(id_object)
But in this case it expands all sub objects by proxyList
- it can be heavy and long for not useful data
- it can expose data without control
Thanks for you help
Sylvain
wlandgraf
(Wagner Landgraf)
2
Thanks Wagner
Indeed, it seems to be the right way but unfortunately, I get difficulties to find the right syntax with FetchEager behind a Find<> with Id.
TXDataOperationContext.Current.GetManager.Find<TObject>(id_object).FetchEager('subobject'));
is wrong.
Same with CreateAlias.
What's the right syntax to use in this case?
Thanks
I found a working syntax but not sure it's the bes
TXDataOperationContext.Current.GetManager.Find<TObject>.CreateAlias('SubObjectList', 'sobj', TFetchMode.Eager).Where(Linq['id_object'] = id_object).UniqueResult);
wlandgraf
(Wagner Landgraf)
5
That is correct.
Note that since you are loading a single object, you could just force the proxy load this way as well:
Object := TXDataOperationContext.Current.GetManager.Find<TObject>(id_object);
Object.SubObject; //forces loading of SubObject
system
(system)
Closed
6
This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.