Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sqlalchemy: MySQLdb.IntegrityError #3

@HLFH

Description

@HLFH

Source: rseichter/automx2#12

Last update by @rseichter

By the way, on a technical note, the changes you made to populate_with_dict() do not really address a bug of automx2, but a quirk of either the particular MySQL driver you used with SQLAlchemy, or possibly of SQLAlchemy itself. Interesting.

sqlalchemy.exc.IntegrityError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
(MySQLdb.IntegrityError) (1452, 'Cannot add or update a child row: a foreign key constraint fails (`automx2`.`domain`, CONSTRAINT `domain_ibfk_1` FOREIGN KEY (`provider_id`) REFERENCES `provider` (`id`))')

I may have to investigate more.

And SQLite does not enforce foreign key constraints.

Metadata

Metadata

Assignees

Labels

backlogbugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions