Fixing interface between Repository and Entity