Le 06/10/2015 21:17, Dan G. Switzer, II a écrit :
I apologize if this has been answered before, but I searched the archives and didn't find it (unless my Google-fu has failed me).

I'm working on project in which the field we're using as the pivot attribute sometimes has starting or trailing whitespace.

I want to trim this string, so that if someone ever fixes the whitespace in the attribute value it will not be seen as a different value.

From what I can tell, this should be possible, but in my testing I don't seem to be having luck.

We're using an hsqldb database as the destination.

Here's what I've done in my lsc.xml file.

My mainIdentifier looks like this:

<mainIdentifier>srcBean.getDatasetFirstValueById("employeeID").trim()</mainIdentifier>

I've then defined the following dataset:

<dataset>
 <name>employeeID</name>
 <policy>FORCE</policy>
 <forceValues>
<string>srcBean.getDatasetFirstValueById("employeeID").trim()</string>
 </forceValues>
</dataset>

I would think this would have LSC trim the attribute for all comparisons.

I've also even changed the InetOrgPerson.xml to rtrim & ltrim the attribute when it inserts the row and for all comparison operations, which I wouldn't even think would be necessary with the other changes.

Is there a better way to automatically trim the pivot attributes?


Hi Dan,

You can trim the dataset but pivotValues are not modified. We added such feature for the next release (2.2, see http://tools.lsc-project.org/issues/756) but we can't say when it will be ready.

Maybe the solution is to have a first connector that wil trim the values in your source, using a different pivot (if the source is LDAP, you can use entryUUID), and then use the second connector to synchronize to HSQLDB.


--
Clément OUDOT
Consultant en logiciels libres, Expert infrastructure et sécurité
Savoir-faire Linux

_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to