I'm trying to define a hierarchy of tables, but am having problems
when a derived table defines a DateTime column.

For example, when I run the script below, using SQLAlchemy 0.4.1 and
Elixir 0.4.0, I get an exception: 'AttributeError: 'Field' object has
no attribute 'strftime''

Thanks for any help.

----
from datetime import datetime
from elixir import *

metadata.bind = "sqlite://test.db"

class Base(Entity):
    using_options(polymorphic=True)
    name = Field(Unicode(255), unique=True)
    creation_date = Field(DateTime, required=True,
default=datetime.now)

class Derived(Base):
    using_options(polymorphic=True)
    modified_date = Field(DateTime, required=True,
default=datetime.now)

setup_all()
create_all()
r = Derived(name="Foo")
session.flush()




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to