Cayenne Commit Exception

From: Dhruti Ramani (dhrutiraman..ahoo.com)
Date: Thu Jul 14 2005 - 11:29:40 EDT

  • Next message: Mike Kienenberger: "Re: Handling Unique Constraint Violations"

    I have a object called AbstractDealState and that has these sub classes,

                à DeadDealState

                à NewDealState

                à DeadFinalState

    To model this in cayenne I am using single table inheritance concept. Now I have another object called Deal. And there is 1 to 1 relation between AbstractDealState and Deal and I joined then by abstractDealState_id(PK of AbstractDealState) and abstractDealState_id(FK of Deal). No "toDepk" checked.

     

    If I create first Deal and set the state as “NewDealState” then it works. Then if I try to create another Deal with same state then it will throw cayenne commit exception that

     

    “Cannot inset a duplicate key into unique key.”

     

    What am I doing wrong here?

    Thanks,

    Denna

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com



    This archive was generated by hypermail 2.0.0 : Thu Jul 14 2005 - 11:29:42 EDT