--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/fd676556-6350-4d0c-90cb-05133e35cb29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
import java.nio.ByteBuffer
import java.util.UUID
import org.bson.{BsonBinary, BsonBinarySubType}
import org.mongodb.scala.bson
import org.mongodb.scala.bson.BsonTransformer
object Test {
implicit val uuidTransformer: BsonTransformer[UUID] = new BsonTransformer[UUID] {
override def apply(value: UUID): bson.BsonValue = {
val bb = ByteBuffer.wrap(new Array[Byte](16))
bb.putLong(value.getMostSignificantBits)
bb.putLong(value.getLeastSignificantBits)
new BsonBinary(BsonBinarySubType.UUID_STANDARD, bb.array)
}
}
}
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/684163d3-326d-4f59-992e-12ae9801cab4%40googlegroups.com.