fix #1111 Updating entity results in error 'This identifier already exists. It must be unique'
Merge pull request #1112 from dennishendriksen/master

Fix #1111 Updating entity results in error