On Thu, Feb 12, 2009 at 14:36, Lukasz Szybalski <[email protected]> wrote: > > On Thu, Feb 12, 2009 at 11:12 AM, jorge.vargas <[email protected]> wrote: >> >> On Thu, Feb 12, 2009 at 4:20 AM, Christoph Zwerschke <[email protected]> wrote: >>> >>> Lukasz Szybalski schrieb: >>>> sa_table def, python class, mapper seem like a natural approach. I'm >>>> not sure what declarative_base does for me that is different? >>>' >> please see >> http://www.sqlalchemy.org/docs/05/ormtutorial.html#creating-table-class-and-mapper-all-at-once-declaratively > > > Looks ok. > > So now, how do I autoload using this declerative_base? > > In the classic example when you define a table you say: > sqlalchemy.Table(name, metadata, autoload=True) > > now with declarative approach you do?
http://www.sqlalchemy.org/docs/05/reference/ext/declarative.html#table-configuration I guess this would also work: mytable = Table(name, metadata, autoload=True) class MyClass(MyDeclarativeBase): __table__ = mytable []s Roger --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

