Philippe Alexis wrote:
Firstly, I had no problem getting updateAttached (EntityManager em) to
run
fine on both SQL Server and Postgresql,
got the count of 4.
Forgot to comment on this one:
I don't use Postgres or SQLServer, but I'm assuming they have this nifty
little feature called "deferred FK enforcement", iow "check on commit",
where FK violations are checked by the database at transaction commit,
as opposed to checking at each DML statement executed. Mysql doesn't
have that feature, hence executing statements in the correct order
becomes an issue. If you disable that on Postgres/SQLServer, you should
see the same behaviour.
Gokhan.