Skip to content

ElytraServers/Exposed-ObjectId

Repository files navigation

Exposed Object Id

Maven Maven GitHub License

An extension to Exposed in supporting ObjectId as primary keys, for developers who want to migrate their data from MongoDB to any other RDB.

Usage

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)
	// ...
}

About

Add Bson ObjectId Support for Kotlin Exposed

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages