-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 thank you, this is fixed in r7aa8ccdc34dd .
On Jan 28, 2012, at 2:02 AM, Fayaz Yusuf Khan wrote: > This simple inheritance mapping script (attached) would work in version 0.7.3 > > but not in 0.7.4. > In the new version it would raise an ArgumentError: > > Traceback (most recent call last): > File "inheritance_discriminator.py", line 22, in <module> > class PhoneContactTimeline(A): > File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative.py", > line 1273, in __init__ > _as_declarative(cls, classname, cls.__dict__) > File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/declarative.py", > line 1266, in _as_declarative > **mapper_args) > File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/__init__.py", > line 1114, in mapper > return Mapper(class_, local_table, *args, **params) > File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line > 202, in __init__ > self._configure_polymorphic_setter() > File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line > 902, in _configure_polymorphic_setter > "Only direct column-mapped " > sqlalchemy.exc.ArgumentError: Only direct column-mapped property or SQL > expression can be passed for polymorphic_on > > And it goes away if a replace cls.discriminator with a string 'discriminator'. > The error persists for single table inheritance too. > You can see that I'm using Python 2.7(.2) > -- > Fayaz Yusuf Khan > Cloud developer and architect > Dexetra SS, Bangalore, India > fayaz.yusuf.khan_AT_gmail_DOT_com > fayaz_AT_dexetra_DOT_com > +91-9746-830-823 > <inheritance_discriminator.py> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJPJBhuAAoJEDMCOcHE2v7hJyYH/03Ub65XQymD6t6eF+7L82De acNS65cAzCbl81LNrh15hd7SOWzI7z6w9lVfdBAUgqlgy0KVKdVDPAudkthaeNrd VvYxWNhf+TOaR8x3jIjcgnAfTzS8vFnCfjgwrc7joWGhbVsN59q2UtNzrDGHAhsa w75GcHKJ6vrfkbcoKhuKgFZTgn7hOmFWl1ZIgGNTI8zNZNxId/ha7x50nBdHZKOf phVTiV7IB3kjGUBRE9sxxNkaUXWO5XuLcPf8m/lhUN9zNQEQ2kM13VkYL0A4p0tC 9rq9Ce/mmm2ML5VRuP1QgH+zyGQ8XQ3E1J3uHLQ/3xTjXYjT6+APY+Uwnite+dA= =8v+C -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en.
