<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello Ilya,<br>
<br>
as you say, it is necessary to use SelectorOptions +
GetOperationOptions.resolve. Optionally with
GetOperationOptions.noFetch.<br>
<br>
An example can be found e.g. in TestModelServiceContract.
<meta http-equiv="content-type" content="text/html; charset=utf-8">
test110-112:<br>
<br>
- 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.<br>
<br>
- 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).<br>
<br>
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).<br>
<br>
Best regards,<br>
Pavol<br>
<br>
On 21. 5. 2015 13:17, Илья Дорофеев wrote:<br>
</div>
<blockquote
cite="mid:F82253638486D44DABA51EC404D48AF384796A@EX-MB1.solar.local"
type="cite">
<pre wrap="">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
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</body>
</html>