zzzeek / sqla_issue_test

1 stars 0 forks source link

custom list classes should be specified in relation() #212

Closed zzzeek closed 6 years ago

zzzeek commented 18 years ago

Originally reported by: Michael Bayer (Bitbucket: zzzeek, GitHub: zzzeek)


custom list types are specifeid like this:

  class Foo(object):
     elements: sets.Set

  mapper(Foo, table, properties={'elements':relation(Element)})

having the sets.Set specified at the class level is inconsistent with everything else. this is a leftover from the old way this was done where classes would construct the list class themselves, etc. now it should be:

   class Foo(object):
     pass

  mapper(Foo, table, properties={'elements':relation(Element, collection=sets.Set)})

and deprecate the other way of doing it.


zzzeek commented 10 years ago

Original comment by Michael Bayer (Bitbucket: zzzeek, GitHub: zzzeek):


Removing milestone: 0.3.0 (automated comment)

zzzeek commented 18 years ago

Original comment by Michael Bayer (Bitbucket: zzzeek, GitHub: zzzeek):


changeset:1947