[mapper]: fixed persisting entities with custom id