[Nitro] Concerns over Og mandating the form of initialize
James Britt
james_b at neurogami.com
Wed Apr 13 10:43:56 EDT 2005
George Moschovitis wrote:
>>Question: If you do not call Foo.new, how is @tstamp initialized to the
>>time of creation?
>
>
> No, I call Foo.new when the object is created:
>
> f = Foo.new
> f.save
> oid = f.oid
>
> then when I reload f:
>
> fr = Foo[oid]
>
> the read method in Og should NOT call initialize again...
> It should call Foo.allocate and the fill in the serialized attributes
> using og_read.
> This is the correct behaviour I think.
That will not restore or set private variables.
f = Foo.allocate
p f.create_date # nil
James
More information about the Nitro-general
mailing list