Package org.mongojack

Annotation Type ObjectId


  • @Retention(RUNTIME)
    @Target({METHOD,FIELD,PARAMETER,ANNOTATION_TYPE})
    public @interface ObjectId
    Indicates that the property should be converted to an ObjectId before being stored in the database, and back to whatever type it is afterwards. Use this if you want an ID to have a String or byte[] value, but you want it stored in the database as an ObjectId.
    Since:
    1.0
    Author:
    James Roper