AugustNagro / magnum

A 'new look' for database access in Scala
Apache License 2.0
153 stars 10 forks source link

Nullable UUID encoding problem given None #30

Closed mbablok closed 2 months ago

mbablok commented 2 months ago

Hello,

thank you for a very nice library.

I stumpled upon a problem with a nullable UUID column in a postgres DB. When a case class instance field has None I get a runtime exception org.postgresql.util.PSQLException: Unknown Types value.

I created a test case to demonstrate it.

https://github.com/mbablok/magnum/commit/2d387a89b23ea1fe556481609242346210eecccc

AugustNagro commented 2 months ago

Thanks for the report, please review this MR and I can make a new release.

AugustNagro commented 2 months ago

Actually, MR needs a little more thought. Will let you know when ready for review.

mbablok commented 2 months ago

Sure, thank you.

AugustNagro commented 2 months ago

Hey, thanks for the patience. I think this is ready now, can you review?

https://github.com/AugustNagro/magnum/pull/31

mbablok commented 2 months ago

No problem.

I work only with PG only so I tend to forget about other DBs. Thanks a lot.

BTW - I found out this is quite easy to have JSONB support in PG - one codec and some readme would suffice. Would you like me to submit a PR for that or help in another way?

AugustNagro commented 2 months ago

Released: https://github.com/AugustNagro/magnum/releases/tag/v1.2.1

BTW - I found out this is quite easy to have JSONB support in PG - one codec and some readme would suffice. Would you like me to submit a PR for that or help in another way?

Sure, that would be welcome!