<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
And as soon as I hit send, it occurs to me, create a stub user to check the namespace.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<pre class="elementToProof"><div class="elementToProof" style="background-color: rgb(30, 31, 34);"><pre class="elementToProof"><div class="elementToProof" style="font-family: "JetBrains Mono", monospace; font-size: 9.8pt; color: rgb(188, 190, 196);"><span class="spanWithBackgroundColor" style="background-color: rgb(41, 60, 64);">def userStub = new UserType()<br>nameServiceUnique = midpoint.isUniquePropertyValue(focus, 'name', name.toString())<br>emailServiceUnique = midpoint.isUniquePropertyValue(focus, 'extension/mail', name.toString())<br>nameUserUnique = midpoint.isUniquePropertyValue(userStub, 'name', name.toString())<br>emailUserUnique = midpoint.isUniquePropertyValue(userStub, 'extension/mail', name.toString())</span></div></pre></div><div class="elementToProof" style="white-space: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br></div><div class="elementToProof" style="white-space: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Just in case someone else runs into this in the future.</div></pre>
<div><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b>From:</b> midPoint <midpoint-bounces@lists.evolveum.com> on behalf of King, Robert via midPoint <midpoint@lists.evolveum.com><br>
<b>Sent:</b> Wednesday, September 09, 2026 14:06<br>
<b>To:</b> midpoint@lists.evolveum.com <midpoint@lists.evolveum.com><br>
<b>Cc:</b> King, Robert <robk@mun.ca>; Pavol Mederly <mederly@evolveum.com><br>
<b>Subject:</b> Re: [midPoint] [EXTERNAL SENDER] Re: Function of midpoint.isUniqueProperty
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
If we wanted to detect and avoid such collisions, would it just be a matter of checking on each class type?</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
<br>
</div>
<div style="background-color: rgb(30, 31, 34);">
<pre><div style="direction: ltr; font-family: "JetBrains Mono", monospace; font-size: 9.8pt; color: rgb(188, 190, 196);"><span class="spanWithBackgroundColor" style="background-color: rgb(41, 60, 64);">nameServiceUnique = midpoint.isUniquePropertyValue(ServiceType, 'name', name.toString())
emailServiceUnique = midpoint.isUniquePropertyValue(ServiceType, 'extension/mail', name.toString())
nameUserUnique = midpoint.isUniquePropertyValue(UserType, 'name', name.toString())
emailUserUnique = midpoint.isUniquePropertyValue(UserType, 'extension/mail', name.toString())</span></div></pre>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
<br>
</div>
<hr style="direction: ltr; display: inline-block; width: 98%;">
<div id="x_divRplyFwdMsg">
<div style="direction: ltr;"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: black;"><b>From:</b> midPoint <midpoint-bounces@lists.evolveum.com> on behalf of Pavol Mederly via midPoint <midpoint@lists.evolveum.com><br>
<b>Sent:</b> Tuesday, September 8, 2026 17:58<br>
<b>To:</b> midpoint@lists.evolveum.com <midpoint@lists.evolveum.com><br>
<b>Cc:</b> Pavol Mederly <mederly@evolveum.com><br>
<b>Subject:</b> [EXTERNAL SENDER] Re: [midPoint] Function of midpoint.isUniqueProperty</span>
</div>
<div style="direction: ltr;"> </div>
</div>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">Hello,</p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">the current implementation limits the search for conflicts to the type of the object provided (e.g., UserType).</p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">So your ServiceType object would not collide with provided UserType.</p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">Source code: <a href="https://github.com/Evolveum/midpoint/blob/9ca2a442a11dc7c8ae35fd908a5347d05ecb4e33/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/expr/MidpointFunctionsImpl.java#L844-L844" id="OWAe4589e85-1b83-8bde-e9c9-cb912b8bf4fc" class="OWAAutoLink" data-auth="NotApplicable" style="margin-top: 0px; margin-bottom: 0px;">
https://github.com/Evolveum/midpoint/blob/9ca2a442a11dc7c8ae35fd908a5347d05ecb4e33/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/expr/MidpointFunctionsImpl.java#L844-L844</a></p>
<p style="direction: ltr; margin-top: 0px; margin-bottom: 0px;">Best regards,</p>
<pre><div style="direction: ltr;">-- 
Pavol Mederly
Interim Chief Product Officer
evolveum.com</div></pre>
<div style="direction: ltr;">On 08/09/2026 21:09, King, Robert via midPoint wrote:<br>
</div>
<blockquote>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
Following the unique property guide</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
<a href="https://docs.evolveum.com/midpoint/reference/support-4.10/concepts/iteration/unique-property-value/" id="OWA1e6be561-f91e-b40d-703b-4f9efd884b43" class="OWAAutoLink" data-auth="NotApplicable">https://docs.evolveum.com/midpoint/reference/support-4.10/concepts/iteration/unique-property-value/</a></div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
And I have a functionality question.  Is the isUniqueProperty function limited by object type?  By that I mean would a service with extension/mail collide with a user with extension/mail?</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: black;">
<br>
</div>
<div style="direction: ltr;"><br>
</div>
<pre><div style="direction: ltr;">_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" id="OWA31eb3126-1daa-9ff2-9a32-3eadf10ead88" class="OWAAutoLink">midPoint@lists.evolveum.com</a>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint" id="OWA8aeb3e1d-f856-87f9-cec2-525f2809956b" class="OWAAutoLink" data-auth="NotApplicable">https://lists.evolveum.com/mailman/listinfo/midpoint</a>
</div></pre>
</blockquote>
</body>
</html>