Blair Zajac wrote:
Turns out that Oracle may return a Date object even if the SQL column is
a timestamp if the hours, minutes and seconds are all 0.
I've proposed a different immediate fix, patch in:
http://dev.rubyonrails.org/ticket/5294
taking the approach that given a field type of datetime (which is what
we have to assume within Oracle), it should always at least format as a
datetime, even if a particular record uses a Date for the value.
#xmlschema was aliased to #to_s for Date, which seems odd; making it
work like Time#xmlschema seems to make more sense.
I'm also thinking we should just dump the whole idea of guessing whether
it should be a Date or Time object -- the idea that it's inferred for
each individual row, resulting in the possibility of different types for
different rows, seems the worst of both worlds.
Why not just use Time, everywhere. It nearly duck-types for Date anyway.
Thoughts?
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core