[JAVA-2201] Validation of query fields and values should be supported Created: 31/May/16  Updated: 05/Jun/17  Resolved: 02/Feb/17

Status: Closed
Project: Java Driver
Component/s: Codecs
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Justin Lee Assignee: Ross Lawley
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: POJO

 Description   

Given a query document, the field names and their values should validated such that fields are discovered to exist (validating against either Java field names or mapped document names) and the value types either match or can be effectively compared.



 Comments   
Comment by Ross Lawley [ 02/Feb/17 ]

This is not feasible with the current MongoCollection API.

As query filters are of type Bson they would have to be converted to a BsonDocument and then compared to the ClassModel. However, there is no guarantee that there even is a ClassModel for any given MongoCollection.

Generated at Thu Feb 08 08:56:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.