New method save() on repository

Fixes issue with lack of em->flush() call after new resource set
this method could be now called in ``add()`` to avoid duplication