When writing a Compass mapping, the ID of each mapped type must be declared within the mapping itself, and must be represented by a property of the type. For example, with OSEM, the ID must be represented as a property of the Class being mapped.
What I would very much like to see would be the ability to "externalize" these IDs, so that they do not have to be present in the mapped class. The ID would become a pure meta-data field in the index, with no representation in the original object.
This would then require the addition of methods to CompassSession, with the ID being passed in to the create() method, along with the object:
session.create(alias, object, id);
The use case for this is that I want to be able to persist a legacy class model in Compass, and the properties of this model are not suitable for use as primary keys in Compass. I want to be able to generate them externally to the model, and pass the ID and model to Compass.
This should be equally applicable to XSEM, JSEM, etc