[sqlalchemy] Re: self referencing column

2010-08-27 Thread waugust
Conrad alexandre.con...@gmail.com wrote: This is the documentation for self referential mapper: http://www.sqlalchemy.org/docs/mappers.html#adjacency-list-relationships I guess you have found the recipes for doing it the declarative way. 2010/8/26 waugust waugustyn...@gmail.com: I'm

[sqlalchemy] self referencing column

2010-08-26 Thread waugust
I've been looking through the documentation and I could have sworn I saw it before but It seem I can't find it once more... I'm looking for how to set up a self referencing column like in this pseudo scenerio: class Action(DeclarativeBase): __tablename__ = 'action' id =

[sqlalchemy] Re: self referencing column

2010-08-26 Thread waugust
I'm guessing that the answer would be as at: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/DeclarativeSelfReferencingTable ? On Aug 26, 8:02 pm, waugust waugustyn...@gmail.com wrote: I've been looking through the documentation and I could have sworn I saw it before but It seem I can't find

[sqlalchemy] Extending DeclarativeBase

2010-08-24 Thread waugust
Greetings, I was playing around and trying to extend the DeclarativeBase with some Elixir like functions... I may be to green in Python itself that I'm missing something though, here's what I got... class ModelBase(DeclarativeMeta): @classmethod def get(cls, id): row =