<div dir="ltr"><div dir="ltr">Alcides is correct, its why I asked earlier on if they were going to have multiple roles, which is one of the limitations of the database table connector. If you plan to have outbound updates then you would need to switch to a scriptedsql connector because it can use a database view as the source data that you will need to manipulate to create a multivalue field for your roles, probably using STUFF in sql, and then when updates occur/needed it can write to any database, table and column on your server.</div><div dir="ltr"><br></div><div>On to your sample, because you don't have a condition it is telling midpoint that the persons 'assignment' value should only should be this value, in an object template it will append values if you have it set that way. You would need to use a condition as in evolveums sample, the easiest way is to identify your roles using the roletype/subtype field.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 10, 2019 at 11:30 AM Alcides Carlos de Moraes Neto <<a href="mailto:alcides.neto@gmail.com">alcides.neto@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>If I'm understanding correctly, you want to create a resource with multiple projections, and each projection would result in a roleAssignment.</div><div><br></div><div>Unfortunately that's not how resources in midPoint work. You can have multiple projections of the same objectType but only with multiple intents.</div><div><a href="https://wiki.evolveum.com/display/midPoint/Focus+and+Projections" target="_blank">https://wiki.evolveum.com/display/midPoint/Focus+and+Projections</a></div><div>If you try to import multiple projections to the same focus object, only one will be linked, the other will stay unlinked (i guess? maybe unmatched?)</div><div><br></div><div>You should struct your table/view like this:</div><div><br></div><div>USER  ROLES  LASTUPDATE</div><div>test    student,employee    datetime</div><div>test2  student                     datetime</div><div><br></div><div>There should be only one line per user. Then you would need to write a script to interpret the ROLES column, splitting it and searching for the roles.<br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua, 10 de abr de 2019 às 12:14, Justin Stanczak <<a href="mailto:rizenine@gmail.com" target="_blank">rizenine@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Here's the exact schemaHandling I'm using. So no on tolerant and not condition set. </div><div><br></div><div><i><schemaHandling></i></div><div><i>        <objectType id="169"></i></div><div><i>            <kind>account</kind></i></div><div><i>            <default>true</default></i></div><div><i>            <objectClass>ri:AccountObjectClass</objectClass></i></div><div><i>            <attribute id="402"></i></div><div><i>                <c:ref>ri:ROLE</c:ref></i></div><div><i>                <tolerant>true</tolerant></i></div><div><i>                <exclusiveStrong>false</exclusiveStrong></i></div><div><i>                <inbound id="435"></i></div><div><i>                    <authoritative>false</authoritative></i></div><div><i>                    <exclusive>false</exclusive></i></div><div><i>                    <strength>normal</strength></i></div><div><i>                    <expression></i></div><div><i>                        <assignmentTargetSearch xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>" xsi:type="c:AssignmentTargetSearchExpressionEvaluatorType"></i></div><div><i>                            <targetType>c:RoleType</targetType></i></div><div><i>                            <oid>afb77728-38c8-4f66-9668-b594c992cad2</oid></i></div><div><i>                        </assignmentTargetSearch></i></div><div><i>                    </expression></i></div><div><i>                    <target></i></div><div><i>                        <c:path>assignment</c:path></i></div><div><i>                    </target></i></div><div><i>                </inbound></i></div><div><i>            </attribute></i></div><div><i>        </objectType></i></div><div><i>    </schemaHandling></i></div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 10, 2019 at 10:40 AM Jason Everling <<a href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">You do not have any <tolerant>false</tolerant> anywhere right? Do you have the condition set? if so, with what?</div><div dir="ltr"><br></div><div dir="ltr"><div><div dir="ltr" class="gmail-m_-4357274830161054556gmail-m_7954327897093017788gmail-m_-7437061333218483359gmail_signature"><div dir="ltr"><br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 10, 2019 at 9:24 AM Justin Stanczak <<a href="mailto:rizenine@gmail.com" target="_blank">rizenine@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Maybe an example not of my own making would help. </div><div dir="ltr"><br></div><div dir="ltr"><i><a href="https://raw.githubusercontent.com/Evolveum/midpoint/1c1975fa450bbee741314c2822c5715ebf68f6b2/samples/hogwarts/objects/resources/resource-csv.xml" target="_blank">https://raw.githubusercontent.com/Evolveum/midpoint/1c1975fa450bbee741314c2822c5715ebf68f6b2/samples/hogwarts/objects/resources/resource-csv.xml</a></i></div><div dir="ltr"><i><br></i></div><div dir="ltr"><div dir="ltr"><i><<b>inbound</b>></i></div><div dir="ltr"><i><span style="white-space:pre-wrap">   </span><expression></i></div><div dir="ltr"><i><span style="white-space:pre-wrap">                </span><assignmentTargetSearch></i></div><div dir="ltr"><i><targetType>c:RoleType</targetType></i></div><div dir="ltr"><i><oid>e2c88fea-db21-11e5-80ba-d7b2f1155264</oid></i></div><div dir="ltr"><i></assignmentTargetSearch>    <span style="white-space:pre-wrap"> </span></i></div><div dir="ltr"><i><span style="white-space:pre-wrap">  </span></expression></i></div><div dir="ltr"><i><span style="white-space:pre-wrap">       </span><target></i></div><div dir="ltr"><i><span style="white-space:pre-wrap">            </span><path><b>assignment</b></path></i></div><div dir="ltr"><i><span style="white-space:pre-wrap">            </span><set>....</set></i></div><div dir="ltr"><i><span style="white-space:pre-wrap">       </span></target></i></div><div dir="ltr"><i></<b>inbound</b>></i></div><div dir="ltr"><br></div><div>If you scroll to the above section you'll find the inbound role assignment. This is basically what I'm trying to do but my resource is a database table. However, using this example just replaces all other assignments for that account and sets this one. That can't be how this example was intended to work? Where am I going wrong? </div><div><br></div><div>Thanks.</div><div>Justin Stanczak</div><div><br></div></div></div></div>_______________________________________________<br>midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote></div>_______________________________________________<br>midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote></div></div>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote></div>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote></div>