[Nitro] Concerns over Og mandating the form of initialize

Anastasios Koutoumanos ak at navel.gr
Thu Apr 14 11:11:06 EDT 2005


George Moschovitis wrote:

>>What value would create_date return after og_read?
>>    
>>
>
>Here is the workflow:
>
>f = Foo.new
>f.tstamp # => Time.now 
>
># now lets save this:
>
>f.save
>
># => INSERT INTO og_foo (..., tstamp, ...) VALUES (..., TimeStampAsSql, ...)
>
>now you read the object back:
>
>f = Foo[foo_oid]
>
>this calls read_one:
>
>read_one first allocates the object:
>
>obj = klass.allocate
>
>and then calls og_read for the object 
>
>obj.og_read(res, 0)
>
>now you have the correct TimeStamp:
>
>f.tstamp # => The original timestamp.
>
>am I missing something ?
>  
>
i think you're missing the fact that tstamp is just a class variable, 
not a prop_* variable!

james is right in the fact that we should allow for internal class 
variables to be persisted some way.

but you're right saying that initialised should _not_ be used when 
restoring an object from the backend.

/t.

>regards,
>George.
>
>  
>


-- 
Navel Ltd
http://www.navel.gr - info at navel.gr - +30 210 6898050

Have fun: www.joy.gr/  and create: www.navel.gr/nitro




More information about the Nitro-general mailing list