containsId

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

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

id in field.withoutSelf().keys