An extension to Exposed in supporting ObjectId as primary keys, for developers who want to migrate their data from MongoDB to any other RDB.
object MyTable : Table() {
// `autoGenerate` parameter is like calling autoGenerate() to UUID columns, where
// the value will be auto-generated on the client side just before insertion of a new row.
val foo = objectId("foo", autoGenerate = false)
}object MyTable : ObjectIdTable() {
// ...
}
class MyEntity(id: EntityID<ObjectId>) : ObjectIdEntity(id) {
companion object : ObjectIdEntityClass<MyEntity>(MyTable)
// ...
}