This question is locked. New answers and comments are not allowed.
Hello,
I have an issue when I retrieve a Changset of objects with the deep fetch group.
Due to my object structure, the function loads too much objects than needed.
There is a sample of this structure, as you can see, if I attempt to retrieve a ApplicationDocument deeply, all the ApplicationDocuments contained in Application will be loaded too.
To get my objects, I use this sequence:
So my question is: How is it possible to keep the DeepFetchGroup behavior and to prevent the loading of all the other references?
By my own investigation, the FetchField attributes are ignored and I can't implement an IObjectCollector because I don't the types by advance.
Thank you for your future answer.
I have an issue when I retrieve a Changset of objects with the deep fetch group.
Due to my object structure, the function loads too much objects than needed.
There is a sample of this structure, as you can see, if I attempt to retrieve a ApplicationDocument deeply, all the ApplicationDocuments contained in Application will be loaded too.
To get my objects, I use this sequence:
using
(IObjectScope scope = ObjectScopeProvider.GetNewObjectScope())
{
IQuery query = scope.GetOqlQuery(oqlQuery);
IQueryResult result = query.Execute();
var container =
new
ObjectContainer();
for
(
int
i = 0; i < result.Count; i++)
{
container.CopyFrom(scope, i.ToString(), result[i],
new
FetchGroupCollector(FetchGroupCollector.DeepFetchGroup));
}
return
container.GetContent();
}
So my question is: How is it possible to keep the DeepFetchGroup behavior and to prevent the loading of all the other references?
By my own investigation, the FetchField attributes are ignored and I can't implement an IObjectCollector because I don't the types by advance.
Thank you for your future answer.