Skip to content

Primitive boolean reading a NULL ... (due to mismatch in models) #354

@rob-bygrave

Description

@rob-bygrave

So there is an external issue which is a mismatch in models, effectively 1 model has a field mapped to Boolean and another has the same field mapped to boolean.

We have the JsonB model with the primitive boolean, reading json that has a value of NULL and this fails.

Conceptually this is an issue that should be solved as ... "fix the models so that they align".

An alternative view/question is ... should primitive boolean handling reading NULL? So it's null safe on reading but doesn't have to be null safe on writing?

I'm pondering this case, I don't know if JsonB should change by:

  • Improving the parsing error reported for this case (it's ok'ish decent at the moment)
  • Actually allowing null on reading primitive boolean (treat it as false, the default value)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions