Improve type matching for Spring Criteria queries

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 0.0.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 2
    • Not Needed
    • Developer Tools

      Our current type matcher does not work anymore in a Spring Criteria project because criteria expressions from Spring boxes any primitive type in a Java object type and which then is not assignable to a detected primitive type from the parsed schema.

      Example:

      Consider the following schema

      { age: BsonInt32 }

      and the following spring query

      where(age).is(30)

      in normal world this should work but because is call converts the provided Int primitive to a Java Object type the resulting BsonType is a BsonAnyOf(BsonInt32, BsonNull) and this is not assignable to the age field which is only expecting BsonInt32

            Assignee:
            Himanshu Singh
            Reporter:
            Himanshu Singh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: