On Jun 4, 1:21 am, Jeremy Evans <[EMAIL PROTECTED]> wrote:
> Yes, and that's the current expected behavior.  As I mentioned, I'll
> accept patches to fix it so that DateTime is returned by the adapter.
> You should change the before_* hooks to use a DateTime if you want to
> use that, though it really won't matter much for your case.
> Alternatively, you can override things to always provide Time instead
> of DateTime.  The only reason that DateTime is the default is that it
> has a larger range than Time, so it works when Time does not (dates
> before 1900, for example).

I'm a bit confused here. In your previous email you said that DateTime
is used in models with typecasting, which I have enabled, but I'm not
seeing that. Using DateTime in my before_create/update blocks on
Organisation.create the updated_at field becomes Time, then DateTime
on a save and then Time again after reload. If I use Time (as I did in
my previous email) I get the same result.

This kind of sucks because Time and DateTime are not compatiable at
all and it breaks the POLS in a big way because given an object I do
not know if the updated_at field is Time or DateTime because even if I
use DateTime or Time exclusively in my own code calling save or reload
anywhere previously has the potential to change the class without my
knowing. The only option is to call reload whenever a function is
passed a sequel object it didn't create which is definitely not an
ideal solution.

If you point me to the file that needs patching I'll have a look at it
and see what I can do but I am not familiar with the Sequel code base.

Farrel
--~--~---------~--~----~------------~-------~--~----~
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