Essentially it is handed the GenerationType and the id attribute's type (XClass)
A pluggable contract for determining the generator type taking these two things as input would already help us. We could then address the following use case (by mapping AUTO to IDENTITY in this case):
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private org.bson.types.ObjectId id;
In addition it would also be interesting to take the given @Type into account. If that was possible as well, we could do the following:
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private String id;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Type(type = "objectid")
private String id;
|