-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
status: ideal-for-contributionAn issue that a contributor can help us withAn issue that a contributor can help us withtype: enhancementA general enhancementA general enhancement
Description
ComparisonOperators.Lte seems to match undefined/null value in switch caseOperator
reactiveMongoTemplate.upsert(Query.query(
Criteria.where("id").is(b.getId())
), AggregationUpdate.update()
.set("field.value").toValue(
ConditionalOperators.switchCases(
CaseOperator.when(Gte.valueOf("field_priority")
.greaterThanEqualToValue(b.getField().getPriority()))
.then("gte"),
CaseOperator.when(Lte.valueOf("field_priority")
.lessThanEqualToValue(b.getField().getPriority()))
.then("lt")
)
.defaultTo("default")
), Bar.class)).flatMap(c -> Mono.just(foo));
if there is no document in the database we expect to run the default case, however we see the lte case is being ran.
We've tried fiddling with the order and gt, lt methods but none of them seem to accomplish what we're after.
Metadata
Metadata
Assignees
Labels
status: ideal-for-contributionAn issue that a contributor can help us withAn issue that a contributor can help us withtype: enhancementA general enhancementA general enhancement