On Jun 29, 1:23 pm, Jim Morris <[EMAIL PROTECTED]> wrote: > I just upgraded to 2.1.0, I'm using posgresql and my script that was > working now throws a > > Invalid date value '' (invalid date) (Sequel::Error::InvalidValue) > > when it reads a date from the database that is NULL. > It did not used to do this, and having NULL dates in the database is > very much an OK thing. > > Any work arounds?
The adapter type conversion code converts NULLs to nil. Apparantly, your code does something like nil.to_s.to_date, which would lead to the error you describe. Without seeing your code, I can't tell you how to fix it. My guess is that you upgraded from version 1.5.1 or previous, and the model typecasting code introduced in 2.0.0 is now giving you an error, but that's just a guess. Please pastie your code somewhere with a full traceback if you would like me to look into 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 [email protected] 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 -~----------~----~----~----~------~----~------~--~---
