[midPoint] Efficient fetching graph of objects

Pavol Mederly pavol.mederly at gmail.com
Thu May 21 19:04:40 CEST 2015


Hello Ilya,

as you say, it is necessary to use SelectorOptions + 
GetOperationOptions.resolve. Optionally with GetOperationOptions.noFetch.

An example can be found e.g. in TestModelServiceContract. test110-112:

- test110 resolves accounts with all their attributes. In this case the 
getObject operation returns the user with each of his linkRefs 
containing full ShadowType object, with all of the attributes. However, 
this requires fetching the object from the resource.

- test112 resolves the accounts without contacting the resource. In this 
case each of linkRefs contains full ShadowType object, but only name + 
uid is filled in (because these are stored in midPoint repository).

However, associations are not stored in midPoint repository. In order to 
get them, you need to contact the resource, so noFetch has to be left 
unset. I'm not 100% sure if you would directly get associated object 
name (not only its ID).

Best regards,
Pavol

On 21. 5. 2015 13:17, Илья Дорофеев wrote:
> Hi,
>
> I have a UserType object instance. Having a ModelService instance, how do I fetch all the accounts assigned to the user and corresponding associations in the most efficient way? I only need accounts' and associations' names. As far as I understand, SelectorOptions should help but I don't understand how to use them properly.
>
>
> Ilya Dorofeev
> Software Architect
> Solar Security
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150521/a764efcf/attachment.htm>


More information about the midPoint mailing list