[Teneo] Constraint validation exception, column ... cannot be null [message #1015971] |
Mon, 04 March 2013 12:54 |
Eclipse User |
|
|
|
Hello,
I'm trying to delete a containment tree. Two of the contained objects
have a bidirectional reference between them. One direction has a
multiplicty of 1..1, so it is required. However, upon deletion, I'm
getting a Constraint validation saying that "column ... cannot be null".
It seems that during the delete, Teneo is doing an intermediate update
on the object which indeed violates the constraint.
How would I solve that best?
And since this seems to be a very basic question: is there a FAQ which I
failed to find where this is descibed?
Thanks
Marius
|
|
|
Re: [Teneo] Constraint validation exception, column ... cannot be null [message #1015984 is a reply to message #1015971] |
Mon, 04 March 2013 13:33 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Marius,
Mandatory bidirectional 1-1 are not that common, but occasionally happen. But indeed a case for which a FAQ entry makes
sense... Will add it when I understand better what a solution could be.
I know that hibernate sometimes does this, to temporary set a foreign key to null when deleting.
Can you enter a bugzilla with an example model? Also which object structure/graph you are trying to delete? This will
help me to reproduce it.
gr. Martin
On 03/04/2013 01:54 PM, Marius Gröger wrote:
> Hello,
>
> I'm trying to delete a containment tree. Two of the contained objects
> have a bidirectional reference between them. One direction has a
> multiplicty of 1..1, so it is required. However, upon deletion, I'm
> getting a Constraint validation saying that "column ... cannot be null".
> It seems that during the delete, Teneo is doing an intermediate update
> on the object which indeed violates the constraint.
>
> How would I solve that best?
>
> And since this seems to be a very basic question: is there a FAQ which I
> failed to find where this is descibed?
>
> Thanks
> Marius
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Teneo] Constraint validation exception, column ... cannot be null [message #1015986 is a reply to message #1015984] |
Mon, 04 March 2013 13:47 |
Eclipse User |
|
|
|
Hello Martin,
On 04.03.2013 14:33, Martin Taal wrote:
> Mandatory bidirectional 1-1 are not that common, but occasionally
> happen. But indeed a case for which a FAQ entry makes sense... Will add
> it when I understand better what a solution could be.
Note that in my case only one direction is mandatory. The other is 0..1.
Surely this is not an exotice use case, or is it?!
> I know that hibernate sometimes does this, to temporary set a foreign
> key to null when deleting.
Could you elaborate, please? Sorry I'm still pretty much of a
Teneo/Hibernate n00b.
Thanks
Marius
|
|
|
Powered by
FUDForum. Page generated in 0.01948 seconds