Hi all, The following is a stripped down use case that I have, where I use single table inheritance and run a query.first(), however I get a deprecation warning and I was wondering why ??
Cheers Dave ==== % cat db.py from sqlalchemy import * from sqlalchemy.orm import * session = scoped_session( sessionmaker( autoflush=False, transactional=True ) ) mapper = session.mapper metadata = MetaData() myTable = Table( 'mytable', metadata, Column('id', Integer, primary_key=True), Column('animate', Boolean, nullable=False), Column('remoteid', String(50), nullable=False), ) class MyTable(object): pass class MyAnimateTable(MyTable): pass myTableMapper = mapper( MyTable, myTable, polymorphic_on=myTable.c.animate ) mapper( MyAnimateTable, inherits=myTableMapper, polymorphic_identity=True, ) def connect(uri): engine = create_engine(uri, strategy="threadlocal") metadata.bind = engine return engine def create(): metadata.create_all() def drop(): metadata.drop_all() ==== % cat test.py from db import * connect('sqlite://memory') drop() create() klass = MyAnimateTable Query(klass).filter(klass.remoteid == "fds").first() ==== Deprecation warning: /usr/lib/python2.5/site-packages/SQLAlchemy-0.4.1dev_r3765-py2.5.egg/sqlalchemy/sql/expression.py:1231: SADeprecationWarning: passing in_ arguments as varargs is deprecated, in_ takes a single argument that is a sequence or a selectable return self._in_impl(operators.in_op, operators.notin_op, *other) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---