Kevin, the default behavior is for relations to be represented by
lists. If what you want is a tree structure where a directory can
only have a single parent, you would use backref=backref(parentdir,
uselist=False). Or at least that's how you'd do it in plain SA; i
haven't used the declarative
On Sun, Feb 1, 2009 at 10:17 AM, Eric Ongerth ericonge...@gmail.com wrote:
Kevin, the default behavior is for relations to be represented by
lists. If what you want is a tree structure where a directory can
only have a single parent, you would use backref=backref(parentdir,
uselist=False).
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
The syntax is basically same. Look at the standard documentation and
examples for relation() and apply it to the decl layer.
- -aj
On 01.02.2009 16:17 Uhr, Eric Ongerth wrote:
Kevin, the default behavior is for relations to be represented by
Kevin,
did you already look at
http://www.sqlalchemy.org/docs/05/mappers.html#adjacency-list-relationships
?
By default, as the doc says, one-to-many is assumed. You want the
backref (parentdir) to be a scalar, so you probably have to specify
remote_side.
Ruben
Thanks for that link! It was late last night when I was looking at
this and, embarrassingly enough, I hadn't gone to that particular
section of the doc.
Kevin
On Sun, Feb 1, 2009 at 10:22 AM, Nebur t...@reifenberg.de wrote:
Kevin,
did you already look at