> While the above code uses some patterns that are unnecessary, there's nothing > about it which would cause that error to occur. To my knowledge, the only > way that particular condition arises is if a flush occurs at an inappropriate > time, namely within an object load, which does not seem to be the case based > on your stack trace. So I am extremely curious how you're getting that to > occur.
I am curious myself. Its exactly like in the given example. Sometimes the exception "seem" to raise randomly. Sometimes the second page of the given RSS is saved the way it should. Most time not though. > The advised way to do "entity name", which is roughly the pattern you have > above, that is, one which maps the same class to multiple tables, is to > create new classes for each table. These can be ad-hoc subclasses of > MyModel if the base class has other significant behaviors. A description of > this is athttp://www.sqlalchemy.org/trac/wiki/UsageRecipes/EntityName. > You'd probably want to pull your mapped classes from a dictionary, and if not > present *then* create the Table object and mapper - the regeneration of the > Table above with useexisting is not an optimal way to do things. All right. I am going to use this way then. I don't like to use "useexisting" as well, but didn't find a better way. Thanks to point it out. -- 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.
