On 7/10/01 9:20 AM, "Howard Lin" <[EMAIL PROTECTED]> wrote:
> If I call doDelete on a table without a primary key, I got the following
> exception:
Why don't you have a primary key? Are you using Torque to generate objects.
All objects that are retrieved/saved by Torque should be indentified
by an OID. I don't think setting up a system where your objects have
no OID/primary key is a bad idea. How are you tracking them without
a unique identifier. Or are you using something else as an identifier?
>
> 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]
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]