|Re: [Teneo] containment: cannot update .. to null [message #1028720 is a reply to message #1028640]
||Thu, 28 March 2013 16:47
| Martin Taal
Registered: July 2009
It is a bit of a hibernate 'issue'. Can you try adding nullable=true to the join column annotation?
On 03/28/2013 03:43 PM, Ricky de Klerck wrote:
> We having some trouble when saving our objects into the database.. This is our model:
> - Folder
> -- 0..* documents: Document (containment: true, EOpposite: folder)
> - Document
> -- 1 folder : Folder (container: true, EOpposite: documents, annotation: @JoinColumn(name="FOLD_ID"))
> The cascade option for containment is set to TRUE.
> I'm trying to delete a Document from a Folder using a RemoveCommand. This works great till I'm trying to save.. Then I
> receive this error:
> cannot update ("FOLD_ID") to NULL
> It looks like it first tries to set the parent to NULL, but this is not allowed in the database..
> How can I solve this?
With Regards, Martin Taal
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
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
Powered by FUDForum
. Page generated in 0.09038 seconds