is there any workaround to avoid this problem?
I cannot use Oracle database.
As of now it is not available for other DBs we already have an enhancement request raised for the same MDM-4524 (for Db2) and MDM-7084(SQL server).
We don't recommend this to be enable and therefore it is disabled for IBM and SqlServer for performance per se. What exactly is your usecase to have custom validation ?
2 use cases,
1) In a merge process of an entity i need to keep the oldest one, instead of the new.
2) In a merge process, i need to compare specific entities fields end then downgrade one of the two entities.
As mentioned earlier custom rules are not supported in db2/sqlserver. If the custom query is simple enough you could try the following.
1. create a rule -say existence check
2. in the dababase - update c_repos_valid_rule.rule_type=6 and also the 'sql_where_clause' column with the custom query sql.
valid_rule_types are in c_repos_valid_rule_type
Please note this is still unsupported but should work simple queries and should be thoroughly tested.