containsId

fun <ID : Any, T> Field<ID, T>.containsId(id: ID): Boolean

Check if the field contains the id, including the local id. If you need to exclude the local value, use instead:

id in field.withoutSelf().keys