domaframework / doma

DAO oriented database mapping framework for Java
https://doma.readthedocs.io/
Apache License 2.0
438 stars 69 forks source link

Prevent unintentionally nullable values in doma-kotlin. #1141

Closed momosetkn closed 1 month ago

momosetkn commented 1 month ago

Until now, runtime error when Bellow code. You can catch the following error at compile time with this pull request.

val nullableEmp : Emp? = null
val stmt = entityql.update(e, nullableEmp).execute()

I fixed only KEntityql and KNativeSql, but maybe other doma-kotlin code requires review.

nakamura-to commented 1 month ago

Good catch! Thanks for your feedback.