I was trying the latest version of SQLAlchemy and (after some trouble with SQLite caused by the fact that my home area is on a network share), I found a problem in the new polymorphic mapper support.
and User, Group and Principal classes with the obvious inheritance relationships, it's possible that creating a new User object will cause SQLAlchemy to attempt to insert into groups table(!)
This fails in my case because I have attributes on Group objects (and in the groups table) that are set to nullable=False and don't correspond to any attribute in the users table.
Originally reported by: Anonymous
I was trying the latest version of SQLAlchemy and (after some trouble with SQLite caused by the fact that my home area is on a network share), I found a problem in the new polymorphic mapper support.
Specifically, with a set-up like
and
User
,Group
andPrincipal
classes with the obvious inheritance relationships, it's possible that creating a newUser
object will cause SQLAlchemy to attempt to insert intogroups
table(!)This fails in my case because I have attributes on
Group
objects (and in thegroups
table) that are set tonullable=False
and don't correspond to any attribute in theusers
table.