(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?

-- 
Sean Legassick
[EMAIL PROTECTED]
      Ek is 'n man: niks menslik is vreemd vir my nie  
      
      



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to