Re: Deleting Object from M to M relation

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Jul 26 2005 - 16:31:08 EDT

  • Next message: Albert Jagnow: "RE: Using a custom PK Table"

    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



    This archive was generated by hypermail 2.0.0 : Tue Jul 26 2005 - 16:31:08 EDT