On Mon Nov 21 20:37:06 2011, Durchholz, Joachim wrote:
Oracle and MS-SQL do not suffer from this limitation, but I've done no testing 
to verify this.

For Oracle, the constraint needs to be configured for "deferrable" checking 
(available since 8i, don't know how well it works today). That postpones constraint 
checks to commit time, and I think it is not the default.
In other words, in a legacy schema, Oracle's constraint checking will be on a 
per-DML-statement basis.
SET CONSTRAINTS ALL DEFERRED will make Oracle postpone all constraint checking 
to the next commit (the Oracle docs claim this is ANSI SQL92 syntax and 
semantics).
Oracle in general is bad at reporting what data exactly caused some constraint 
violation; deferring checks to commit time is going to make that worse if at 
all possible.

Just enumerating the issues.
I sure would like to see deferred checking in Cayenne. I have absolutely no 
idea whether it's worth the challenges though.

Regards,
Jo

How is this a Cayenne issue? Isn't that just a property of the database as a whole which you set up at config time?

After having spent a long time struggling with this in mysql when upgrading schemas, I have to say it would be a very nice feature to have in my db of choice. Oh, I forgot to mention the mysql workaround:

1. Set the db constraints to OFF
2. Do your schema stuff
3. Set the db constraints back to ON
4. Check that you didn't break anything:

http://forge.mysql.com/tools/tool.php?id=11

That procedure works really well.

Ari

--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Reply via email to