I'm not sure what trouble you're having with delete... I have code that seems to work fine doing the following. Table A, 1 -------- Many Table B
Criteria crit = new Criteria(); crit.add(BPeer.A_FOREIGN_KEY, aFKey); B.doDelete(crit); This will delete all related rows in Table B given a aFKey value. If your having other issues post your error messages and relevant section of myproject-schema.xml Steve On Tue, 2002-12-10 at 20:10, [EMAIL PROTECTED] wrote: > > So ... I've read the threads in the archives but to make sure ... is the > only way to delete an object by using it's Peer.doDelete() method and > passing a Criteria object that specifies the primary key? This means that > even join tables now have to have primary keys of their own ... and that I > have to constantly look up primary keys using normal Criteria objects, form > Lists and iterate over them doDelete()'ing on each one. Or am I missing > something obvious? > > Please say yes. :) > -j > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
