Skip to content

Add support for CriteriaDefinition on $or operator #3895

Open
@alxxyz

Description

@alxxyz

Currently in Criteria class we have the method

public Criteria orOperator(Criteria... criteria) {
		BasicDBList bsonList = createCriteriaList(criteria);
		return registerCriteriaChainElement(new Criteria("$or").is(bsonList));
	}

This can be changed to

public Criteria orOperator(CriteriaDefinition... criteria) {
		BasicDBList bsonList = createCriteriaList(criteria);
		return registerCriteriaChainElement(new Criteria("$or").is(bsonList));
	}

In this case it will be more flexible, and also it will be possible to have Criteria and TextCriteria mixed in $or operator.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions