﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
10960	fixture loading of M2M fields fails for child ids greater than 9	adrian_nye	nobody	"
Loading data in a JSON file that includes data for both models involved in a M2M relationship,
child ids up to 9 work fine, 10 or greater cause an error on MySQL or Postgres

On Postgres:

psycopg2.IntegrityError: insert or update on table ""entity_person_address"" violates foreign key constraint ""entity_person_address_address_id_fkey""
DETAIL:  Key (address_id)=(0) is not present in table ""entity_address"".

On MySQL:

Cannot add or update a child row: a foreign key constraint fails - tixsa.entity_person_telephone CONSTRAIN telephone_id_refs_id_92398a FOREIGN KEY telephone_id REFERENCES entity_telephone id

To see problem, use the attached model file and attached initial_data.json.   You'll see the errors above.  Then search for an id of ""10"" and change it to ""1"" and the problem goes away.
"		closed	Uncategorized	1.0		invalid			Unreviewed	0	0	0	0	0	0
