db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <Fisc...@seitenbau.net>
Subject RE: Setting non-autogened ids under native idMethod
Date Thu, 09 Dec 2004 09:12:09 GMT




Hi Sarav,

Have you tried the following:
- load the object in question
- delete the object but keep a reference in memory
- call the object's methods setModified(true) and setNew(true)
- save the object

Not sure whether this works with autogenerated ids, but it might be worth
trying

     Thomas


"Saravana Krishnan Kannan" <saravkrish@uky.edu> schrieb am 08.12.2004
22:19:08:

> Hi,
>
>   I have a table which generally uses autogenerated ids. But under
> some circumstances, I need to delete a record and create a new one
> with the same id. I can't use doUpdate here because deleting the
> record causes a cascaded delete of a big tree of records and thats
> the reason I'm doing the delete in the first place. How do I go
> about doing this? "This" meaning, creating a new record with a non-
> autogenerated id for a table whose idMethod is native. I know some
> flags need to be set, but I don't know what all flags need to be set
> to what value.
>
> Thanks in advance.
>
> ~Sarav
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message