Re: many-to-many mapping resulting in incomplete SQL queries

From: Michael Gentry (
Date: Mon May 12 2008 - 12:23:51 EDT

  • Next message: Daniel Doppmeier: "Re: many-to-many mapping resulting in incomplete SQL queries"

    [followup back to the user list]

    Hi Daniel,

    The first time I ran your test application it did indeed crash with
    the missing WHERE clause (this is on Cayenne 3.x, too). I went into
    your Cayenne Model, though, and on your Person_is_author_of_book table
    (you didn't map it as a class, which is cool since you are flattening
    it), I checked the PK/Mandatory checkboxes under the Attributes tab
    for the DbEntity. Then I re-ran the application and it worked:

    INFO: DELETE FROM Person_is_author_of_book WHERE bookID = ? AND personID = ?
    May 12, 2008 12:17:06 PM org.apache.cayenne.access.QueryLogger
    INFO: [bind: 1->bookID:2, 2->personID:2]

    Try updating your model and see if it fixes your issue.



    This archive was generated by hypermail 2.0.0 : Mon May 12 2008 - 12:24:24 EDT