This does look like a CAST issue, so it would be interesting to know which database type and what workarounds you've tried.
I've seen a similar issue on postgres where we needed a CAST from varchar to UUID resolved by adding a cast to the DB by executing this SQL on the DB:
create CAST (varchar AS uuid) WITH inout AS IMPLICIT;
If this is failing during the update step, adding a cast to the Ruleset won't help because the failure occurs when we try to update the value with a String and the DB can't cast that back to the identifier type.