Allow import of entities without a primary key (relatedByAttribute)

#Issue 640

If a primary key is not defined always do an insert.