Re: can't commit null fk

From: Laszlo Spoor (lspoor_cayenn..otmail.com)
Date: Wed Jul 02 2003 - 16:22:04 EDT

  • Next message: Merritt, Scott: "Lazy Fetches"

    Hi Jean-Paul,

    I have created a little test as you described. I have no troubles at all. I
    have attached the testcase to this email.

    Hope this helps, Laszlo

    >From: "Jean-Paul Le Fèvre" <lefevr..ep.saclay.cea.fr>
    >To: cayenne-use..bjectstyle.org
    >Subject: can't commit null fk
    >Date: Wed, 2 Jul 2003 21:53:37 +0200 (CEST)
    >
    >In a table T1 a column t2_id is a foreign key to the row id of a
    >table T2. It is permitted to have null value in this column.
    >
    >The relationship is correctly managed by Cayenne : in the java
    >code I can get and set non null values for the column but when I try
    >to set null value the program itself behaves as expected but the table
    >in the MySQL database is not updated.
    >
    >I've checked that :
    >- the commit() method is called.
    >- the modeler shows that the attribute is not mandatory.
    >
    >
    >--
    >___________________________________________________________________
    >
    >Jean-Paul Le Fèvre * Mail : J-P.LeFevr..ea.fr
    >
    >

    _________________________________________________________________
    Add photos to your messages with MSN 8. Get 2 months FREE*.
    http://join.msn.com/?page=features/featuredemail





    This archive was generated by hypermail 2.0.0 : Wed Jul 02 2003 - 16:21:56 EDT