Does somebody know if is possible to use a declarative class
definition for the schema below
####
content = Table('content', meta.metadata,
Column('id', types.Integer, primary_key=True, autoincrement=True),
Column('title', types.String(80)),
Column('parent_id', types.Integer, ForeignKey('content.id')),
Column('type',types.String(32)),
)
class Content(object):
mapper(Content, content, polymorphic_on=content.c.type,
polymorphic_identity='content', properties={
'children': relation(Content, backref=backref('parent',
remote_side=[content.c.id]))
})
####
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---