Michael Bayer a écrit :
well, theres nothing that says the attribute youre sending in is
wrong. classes in python dont have any notion of predeclared
attribute names. a mapped class can have any number of other
attributes which dont correspond to database-mapped attributes.
Yes, of course.
hello.
I'm trying to use DynamicMetaData so that two separate tests can each
connect to a unique db, create some tables, insert some data, delete
that data, then drop the tables.
This seems to yield ...
sqlalchemy.exceptions.ConcurrentModificationError: Updated rowcount 0
does not match number
when i run this program, I get no errors.
a few things to note:
it makes no sense to do a session.flush() after youve dropped the
table (similarly, it makes no sense to flush() before youve done
anything but thats less of an issue). if there were any modified
state within your session
A query that doesn't rely on broken GROUP BY might look like
select([forum_topics,
select([func.max(forum_posts.c.created)],
forum_posts.c.topic_id==forum_topics.c.id,
scalar=True).label('last_post')],
order_by=[desc('last_post')])
On 12/28/06, Mart