On Jun 4, 6:22 am, myobie <[EMAIL PROTECTED]> wrote:
> I am working with a legacy mysql database that defaults dates to all
> zero's for everything and sequel is not happy about it.
>
> I suppose when it typecasts the date when I do a find (Product.first)
> it gives an error that it's an invalid date.
>
> I am looking into fixing the 0000 problem in the db, as it's pretty
> stupid, but that may not be possible. Is there a way to tell sequel
> that that == nil?

You can override String#to_{time,date,datetime} to detect the 0000
date and return nil.  That will probably fix it.

Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to sequel-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to