[midPoint] scriptedsql example
Frigerio, Joshua
joshua at uic.edu
Fri Aug 3 21:27:11 CEST 2018
>
>You have:
>sql.eachRow("SELECT name,timestamp,id,notes,birthdate,netid FROM person "
>+ where, {result.add([__UID__:it.id, __NAME__:it.netid, ])} );
>
>Should be:
>sql.eachRow("SELECT name,timestamp,id,notes,birthdate,netid FROM person "
>+ where, {result.add([__UID__:it.id, __NAME__:it.netid, notes:it.notes,
>birthdate:it.birthdate])} );
Ug, that was right there in the example too, somehow I missed thatŠ.
Thanks!
Although it doesn¹t work for date fields (datetime or timestamp mysql
types). If I try to add the ³timestamp² field or the ³birthdate" field, it
says, ³Got unexpected exception: java.lang.IllegalArgumentException:
Attribute 'birthdate' type 'class java.sql.Timestamp' is not supported."
In the schema groovy script, I told it to treat it as a String.class, but
it doesn¹t work anyway. :-(
More information about the midPoint
mailing list