i think it's time for some em.save method which would do update or create using same logic