ReactivePanacheMongoEntity

Represents an entity with a generated ID field id of type ObjectId. If your Mongo entities extend this class they gain the ID field and auto-generated accessors to all their public fields, as well as all the useful methods from ReactivePanacheMongoEntityBase.

If you want a custom ID type or strategy, you can directly extend ReactivePanacheMongoEntityBase instead, and write your own ID field. You will still get auto-generated accessors and all the useful methods.

See also

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun delete(): Uni<Void>

Delete this entity from the database, if it is already persisted.

Link copied to clipboard

Persist this entity in the database. This will set its ID field if not already set.

Link copied to clipboard

Persist this entity in the database or update it if it already exists.

Link copied to clipboard
open override fun toString(): String

Default toString() implementation

Link copied to clipboard

Update this entity in the database.

Properties

Link copied to clipboard
var id: ObjectId?

The auto-generated ID field. This field is set by Mongo when this entity is persisted.