3 messages in com.googlegroups.sqlalchemy[sqlalchemy] odd adjancency list w/ j...| From | Sent On | Attachments |
|---|---|---|
| Kapil Thangavelu | 29 Nov 2007 09:25 | .txt, .py |
| Michael Bayer | 29 Nov 2007 10:49 | |
| Michael Bayer | 29 Nov 2007 11:47 |
| Subject: | [sqlalchemy] odd adjancency list w/ join_depth behavior![]() |
|---|---|
| From: | Kapil Thangavelu (kapi...@gmail.com) |
| Date: | 11/29/2007 09:25:00 AM |
| List: | com.googlegroups.sqlalchemy |
| Attachments: |
hi folks,
i seem to be running into a bug or misconfiguration with sqlalchemy's tree handling.. the table and mapping themselves seem fairly innocuous
concepts_table = Table("concepts", metadata, Column("id", types.Integer, primary_key=True), Column("name", types.Unicode, nullable=True), Column("parent", types.Integer, ForeignKey(" concepts.id") ) )
class Concept( object ): pass
mapper(Concept, concepts_table, properties={ 'children': relation(Concept, cascade="all", backref=backref("parent_node", remote_side=[concepts_table.c.id]),
collection_class=attribute_mapped_collection('name'), lazy=False, join_depth=3)})
the odd part is if i specify any join_depth i got an error, if i leave it off its fine. i'm still curious to find out what causes the error and if its a bug or just misconfiguration on my part.
i'm attaching a script which demonstrates the issue, and a contextual traceback (ipython) of the error.
thanks,
kapil
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqla...@googlegroups.com
To unsubscribe from this group, send email to
sqla...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---





.txt, .py