.onUndeclaredKey("delete") is breaking mongodbs _id field
Im not sure why this happens but when we have a type that has an _id which is a mongodb bson object, onUndeclaredKey(delete) causes mongodb to throw an error about the _id.
If i use .onUndeclaredKey("reject"), that works fine. If i dont use onUndeclaredKey method at all mongo works fine.
Its also worth noting the _id looks correct after parsing the data with arktype but for some reason mongodb does not like the _id after it has gone through .onUndeclaredKey("delete")

1 Reply
Cam you send a minimal repro?