New method save() on repository

Fixes issue with lack of em->flush() call after new resource set