Re: Need help with PSQLException

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Jun 02 2005 - 17:12:02 EDT

  • Next message: Mike Kienenberger: "Re: Unit test for CayenneClinic (Spring integration demo) -- DataContext binding to threadlocal?"

    > Hi,
    >
    > I have two objects Review(booelan isCompleted, boolean isThordParty) and
    > Deal and one to one relation between them. Initially I am assigning
    > Review to Deal with all fields of Review to be false. Now if I change
    > some fields of Deal and commit it throws this Exception.
    >
    > "Cannot insert a duplicate key into unique review_deal_id_key"
    >
    > What am I doing wrong here?
    > Thanks,
    > Denna

    My guess is that you overlooked "to dep pk" checkbox on the deal -> review
    relationship (you have to check it). But if this doesn't help (meaning I
    made a wrong assumption about your mapping), please send an extract from
    the DataMap XML file showing how these two tables and relationship between
    thm are mapped, and also SQL logs prior to the error that you mention.

    Andrus



    This archive was generated by hypermail 2.0.0 : Thu Jun 02 2005 - 17:12:04 EDT