Use the id$ value if set, when saving an entity