Re: Deleting Object from M to M relation

From: Dhruti Ramani (dhrutiraman..ahoo.com)
Date: Wed Jul 27 2005 - 09:42:36 EDT

  • Next message: jason dwyer: "Re: cgen, "incremental database updates", etc."

    Thanks Andrus,
     
    Making those two columns as PK, it seems like exception goes away.
     
    Thanks again,
    Denna

    Andrus Adamchik <andru..bjectstyle.org> wrote:
    Hmm... now this is strange - a delete query without a qualifier... I'd
    even open a feature request to make sure Cayenne detects such cases and
    reports a meanigful error.

    The only reason I can think of is that the join table columns that
    participate in relationships are not marked as PK. Are they?

    Andrus

    > Hi,
    > Sorry I am asking this question again.
    >
    > I am using cayenne1.1 and postgresql7 as database.
    > I have M to M relation between SystemUser and UserRole objects, join table
    > is called UserRole_SystemUser.
    >
    > Now if I add some SystemUser to UserRole I don't have any problems but
    > when I try to delete the user from UserRole and if i say commitChanges()
    > it throws following exception,
    >
    > INFO QUERYLOGGER : DELETE FROM UserRole_SystemUser WHERE
    > INFO QUERYLOGGER : *** error.
    > java.sql.SQLException: ERROR: parse: parse error at end of input
    >
    > I really need help with this.
    > Thanks,
    > Denna

                    
    ---------------------------------
     Start your day with Yahoo! - make it your home page



    This archive was generated by hypermail 2.0.0 : Wed Jul 27 2005 - 09:42:37 EDT