[Nitro] Concerns over Og mandating the form of initialize

George Moschovitis george.moschovitis at gmail.com
Thu Apr 14 10:38:10 EDT 2005


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

regards,
George.

-- 
http://nitro.rubyforge.org
http://www.joy.gr




More information about the Nitro-general mailing list