Add create for entityRelationships, fix some bugs in syncing