cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From emeka okafor <>
Subject one-to-many
Date Sat, 09 Feb 2013 16:20:03 GMT
I am working on a desktop app at the moment and I have to use either h2 or derby as DB. Now
I don't know what I am doing wrong but I can't seem to be able to delete elements from a one-to-many
relations, no matter whether it is the "toOne"    or the "toMany". I get a constraint violation
error. Has anybody had the same problems before? I hope that it is not related to the lack
of "deferred constraint checking" in both databases. Anyway, any idea what might be wrong
or how to solve it?
To illustrate my point, this is the simplest case of one-to-many anyone could come up with:

       <obj-relationship name="children" source="Father" target="Child" deleteRule="Cascade"
       <obj-relationship name="father" source="Child" target="Father" deleteRule="Nullify"

I cannot delete neither father nor children whithout getting a constraint violation error.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message