Instant type mapper now allows NULL values #38
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When doing a
.leftJoin()
operation, it's often the case that the right hand side will consist of all null values if the join expression does not match a row.In my case, I was using an
java.time.Instant
-typed field, and I was getting exceptions such as,The short of it is that
Dialect.InstantType
, which is aTypeMapper[Instant]
didn't allow NULL values to go through.The fix is trivial - just adding a
null
pass-through for the match expression.PS: Similar to InstantType, I noticed that some other TypeMappers do not pass NULL values through. If this PR looks like the right approach to solve this, I can submit a different PR that addresses these other issues.