On Tue, Jan 13, 2009 at 3:32 PM, grassoalvaro <[email protected]> wrote:
>
> Hi,
>
> Can someone tell me how to declare models using sqlalchemy 5.0?
> When i'm trying something like that:
>
> class Worker(object):
> __tablename__ = 'workers'
> id = Column(Integer, primary_key=True)
>
> and next i'm importing it in model.__init__, command paster setup-app
> dosn't create declared table.
>

please review the SA documentation it excels at well everything.

You are probably trying to use "SA declarative" which means you
classes need to extend "declarative base" rather than object. As
explained here 
http://www.sqlalchemy.org/docs/05/ormtutorial.html#creating-table-class-and-mapper-all-at-once-declaratively

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

Reply via email to