Merge pull request #56 from hAdamm/as-bugFix

added foreign key reset when entity is deleted from collection
Added protection against saving an entity, which does not have a repository