-
Couldn't load subscription status.
- Fork 22
Closed
Description
Description:
When using insertMany() with objects containing Array properties, the operation fails because the property value mapping logic does not handle array types. The code currently only handles String and Number types, causing arrays to hit the assert false branch.
Steps to Reproduce:
- Create an object with an Array property (e.g.,
String[],List<String>) - Attempt to insert using
insertMany() - Operation fails with
AssertionError(if assertions enabled) or silently ignores the property (if assertions disabled)
Code Location:
io.weaviate.client6.v1.api.collections.data.InsertManyRequest.lambda$buildObject
Current Code Issue:
if (value instanceof String v) {
protoValue.setStringValue(v);
} else if (value instanceof Number vx) {
protoValue.setNumberValue(vx.doubleValue());
} else {
assert false : "(insertMany) branch not covered"; // Arrays hit this branch
}Impact:
- Array properties are not persisted when using
insertMany() - Data loss for array fields
- Potential
AssertionErrorcrashes if assertions are enabled
Metadata
Metadata
Assignees
Labels
No labels