[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 logQueryParameters INFO: [bind: 1->bookID:2, 2->personID:2] Try updating your model and see if it fixes your issue. Thanks, /dev/mrg