We'll need a more flexible mapping of the AUTO mapping in ORM for that. Currently that's more or less hard-wired (only dependent on the "use new generator mappings" setting), whereas we'd need to make that decision individually for each usage of AUTO, depending on the id property type, and possibly on any @Type value given, allowing the following map to IDENTITY and thus object ids for MongoDB:
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Type(type = "objectid")
String id;
So we'd need a (pluggable) contract which returns the strategy to map AUTO to, taking id property type and optionally @Type as an input. And OGM would have to override the default implementation.
|