Re: Deleting Object from M to M relation

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Jul 26 2005 - 17:27:19 EDT

  • Next message: Gary Jarrel: "ObjectContext & DataContext"

    > Should it be both marked as PK in
    > join table?

    Why don't you just go ahead and try it? ;-)

    Andrus

    > No, they are not marked as Primary key. Should it be both marked as PK in
    > join table?
    >
    > Thanks,
    > 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
    >
    >
    > __________________________________________________
    > 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 : Tue Jul 26 2005 - 17:27:20 EDT