Re: violation of FOREIGN KEY constraint "INTEG_676"

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jul 07 2004 - 10:56:23 EDT

  • Next message: Andrus Adamchik: "Re: postgresql "TABLENAME" versus TABLENAME"

    Hi Valentin,

    It is not immediately clear to me what happens here. You will need to
    provide more information. Namely:

    1. Version of Cayenne you use.

    2. SQL generated by Cayenne during the commit when the failure occurs
    (the best thing would be to show two SQL outputs - for successful
    commit and for the one that fails). To turn on SQL logging follow these
    instructions -
    http://objectstyle.org/cayenne/userguide/deploy/logging.html

    3. A part of the DataMap that shows how relationship between x and y is
    mapped (are there any other objects committed in the same run?)

    Andrus

    On Jul 7, 2004, at 8:19 AM, Valentin Bosilkov wrote:
    > I have Object "X" with foreign key to obj "Y"(not null) ... and String
    > blahBlah
    >  
    > some times when i use
    > .....
    >  
    > x.setBlahBlah("sth");
    >  
    > //if i do not use throw exeption ... see Below
    > x.setToY(x.getToY());// x.getToX()... is not NULL
    >  
    > dataContext.commitChanges();
    > .....
    >  
    > please help me ...



    This archive was generated by hypermail 2.0.0 : Wed Jul 07 2004 - 10:56:27 EDT