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]

Reply via email to