Fix issue where tables are based on records of different classes but classes have same name/type of fields. Also, when doing INSERT into a collection, convert the objects so they are correct type for the collection.