Michael A. Schoen wrote:
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.

Do you have any URLs describing why we have to assume a datetime in Oracle?

#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.

Agreed.

Why not just use Time, everywhere. It nearly duck-types for Date anyway.

I think that's a good idea.

If we do this, then the above patch is a short term workaround, correct?

Regards,
Blair

--
Blair Zajac, Ph.D.
<[EMAIL PROTECTED]>
Subversion training, consulting and support
http://www.orcaware.com/svn/
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to