Usual way to handle this case is make the combination of these two fields
the primary key.
This also make s sense because it insures that each relationship is not
duplicated.
Do you have any problem with this?
fedor.
> -----Original Message-----
> From: Warner Onstine [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 10, 2001 8:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: doDelete without a primary key
>
>
> What about many-to-many relationships? If I have a table (a
> bridge) that
> only contains two fields, how would that be handled?
>
> -warner
>
> ----- Original Message -----
> From: "Fedor Karpelevitch" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 10, 2001 7:29 AM
> Subject: RE: doDelete without a primary key
>
>
> > I think you are always better having a primary key.
> Particularily in this
> > case without a PK you can never tell if you are deleting
> what you wanted
> to.
> >
> > fedor.
> >
> > > -----Original Message-----
> > > From: Howard Lin [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, July 10, 2001 6:20 AM
> > > To: Turbine-User (E-mail)
> > > Subject: doDelete without a primary key
> > >
> > >
> > > If I call doDelete on a table without a primary key, I got
> > > the following
> > > exception:
> > >
> > > com.workingdogs.village.DataSetException: You must specify KeyDef
> > > attributes for this TableDataSet in order to delete a Record.
> > > at
> > >
> com.workingdogs.village.Record.getDeleteSaveString(Record.java:439)
> > > at com.workingdogs.village.Record.getSaveString(Record.java:528)
> > > at
> > > com.workingdogs.village.Record.saveWithDelete(Record.java:204)
> > > at com.workingdogs.village.Record.save(Record.java:189)
> > > at com.workingdogs.village.Record.save(Record.java:166)
> > > at
> > > org.apache.turbine.om.peer.BasePeer.doDelete(BasePeer.java:621)
> > > at
> > > org.apache.turbine.om.peer.BasePeer.doDelete(BasePeer.java:491)
> > >
> > > If I add a primary key to the table, doDelete works fine. Is
> > > there a way
> > > to call doDelete without specifying a primary key? Thanks,
> > >
> > > Howard Lin
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]