On Feb 28, 2006, at 1:15 PM, Marko Mikulicic wrote:
On 28.02.2006., at 17:37, Michael Bayer wrote:
anyway, create_instance is not too different from the
append_result you already figured out:
class MyExt(MapperExtension):
def create_instance(self, mapper, row, imap, class_):
if row['col1'] == 'foo':
return Organization(_mapper_nohistory=True)
else:
return Person(_mapper_nohistory=True)
Ah nice.
When I select objects from Person.select() I get the same instance.
Is possible to obtain this behaviour using custom object creation?
show me more specifically what you mean.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users