path

fun <T> KProperty<T>.path(): String

Returns a mongo path of a property.

The path name is computed by checking the following and picking the first value to exist:

  • SerialName annotation value

  • BsonId annotation use '_id'

  • BsonProperty annotation

  • Property name