
com.avsystem.commons.mongo.mongoId.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-mongo_sjs1_2.12 Show documentation
Show all versions of commons-mongo_sjs1_2.12 Show documentation
AVSystem commons library for Scala
The newest version!
package com.avsystem.commons
package mongo
import com.avsystem.commons.annotation.AnnotationAggregate
import com.avsystem.commons.serialization.{name, outOfOrder}
/**
* Shortcut annotation for applying `@name("_id")` and `@outOfOrder` annotation on a case class field,
* which is typical for MongoDB ID field.
*/
class mongoId extends AnnotationAggregate {
@name(mongoId.Id) @outOfOrder
final def aggregated: List[StaticAnnotation] = reifyAggregated
}
object mongoId {
final val Id = "_id"
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy