moved linking relation to saveEntity. also repeat once if link is unsaved.
save loops until all entities and relations are saved.
changed expected result; save saves all entities and relations at once.