[entity] fixed persisting with predefined id [closes #41]