Fixed bug when updating to new to-many relationship data model from previous versions.