Sean Legassick wrote:
>
> (For John mainly)
>
> The torque generated save() method uses getId() returning null to determine
> whether this is a new object and should be INSERTed rather than UPDATEed.
> However the new generated getId() override will always return a non-null
> String, breaking save().
>
> A fix that I can think off the top of my head is:
>
> a) Initialise int primary key fields to BaseObject.NEW_ID
> b) Initialise non-int primary key fields to null
> c) In getId() check for NEW_ID intPK fields and null non-int PK fields and
> if any found return null.
>
> This seems overly gnarly to me though...any better ideas?
Oops. Something like what you suggest will probably be necessary.
Still considering using an inner class, also. I am adding quite a few
methods in addition to the save(). I will try to get something in for
you to look at within the next couple days. The addSaveMethod property
in torque.props should probably be set to false for now. Will do.
John McNally
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]