bug fix for One-to-many and many-to-many relationships when refering to
the same entity type in existing collections
Merge pull request #2640 from ten24/feature-bugFixForSameTypeRelationshipsOfExistingCollections

bug fix for One-to-many and many-to-many relationships when refering to