Hi, I'm experiencing a similar problem in my program (Sqlalchemy 0.8.4).
In my case no blob column is involved, the problem seems to be related to
presence of a foreign key in the target table. Here is the traceback of the
error:
File C:\Python27\lib\site-packages\sqlalchemy\orm\session.py,
The example works wonderfully,
however i noticed, that when i attach a constraint to the column, it gets
mirrored in the table
so the event handler
@event.listens_for(PString, after_parent_attach)
def create_constraint(target, parent):
@event.listens_for(parent, after_parent_attach)
i discovered a workaround
by doing
@event.listens_for(PString, after_parent_attach)
def create_constraint(target, parent):
@event.listens_for(parent, after_parent_attach)
def add_to_table(col, table):
constraint = CheckConstraint(column(col.name) != text(''),
_autoattach=False)
there’s a SQLAlchemy issue here, marked as ticket
http://www.sqlalchemy.org/trac/ticket/2896, however resolving this issue still
won’t fix your issue. You’re emitting an INSERT on a table where the primary
key needs to refer to a column elsewhere. that is:
task = Table('y', metadata,
issue #2896 is resolved for 0.8.5 and 0.9.0.
On Dec 20, 2013, at 10:03 AM, Michael Bayer mike...@zzzcomputing.com wrote:
there’s a SQLAlchemy issue here, marked as ticket
http://www.sqlalchemy.org/trac/ticket/2896, however resolving this issue
still won’t fix your issue. You’re emitting
On Dec 20, 2013, at 8:45 AM, RonnyPfannschmidt ronny.pfannschm...@gmail.com
wrote:
The example works wonderfully,
however i noticed, that when i attach a constraint to the column, it gets
mirrored in the table
so the event handler
@event.listens_for(PString, after_parent_attach)