Hi, I would like to know is this the proper way to prefetch SubEntity but set the SubEntity into the MainEntity from Context instead of new MainEntity through adding to the QueryParameters.CollectionToFetch?
Example:
EntityX is a MainEntity, EntityY is a SubEntity of EntityX, EntityZ is a SubEntity of EntityY
User wants to fetch EntityX with FilterCriteria (PK = 01) from Database first
Then this EntityX will be added to the Context.
Next time if user wants to prefetch EntityY. But, the system will add the EntityX with FilterCriteria (PK = 01) from the Context into the QueryParameters.CollectionToFetch first then add the PrefetchPath (EntityX prefetch EntityY) to the QueryParameter.PrefetchPathToUse.
BUT
If user wants to prefetch EntityZ that is not a subEntity of EntityX. I thought the EntityX will also help to prefetch the EntityZ and place it into EntityY which was prefetched before with the EntityX but it didnt. If want to do this, user need to put the EntityY from the Context into the QueryParameters.CollectionToFetch.
With this example, this helps the Entity from Context to prefetch new Entity will not have different ObjectId when need to prefetch Entity.
Thanks.