So when the data was mapped back to my Person object I ended up with a null value for name. Oracle simply won't let insert an empty string. This is because Oracle internally changes empty string to NULL values. Persisting to OracleDB (instead of embedded H2).But we finally figured out what was happening when we notice it was only reproducible under the following conditions: To make things more difficult there where other failures in the communication layer masking the real issue. Tests where passing with flying colors, but for some reason we were noticing that the name would sometimes come back as null even thought it was typed as String and not String?. So I had modeled the following Entity leveraging Kotlin’s data classes 1: Let’s start by setting the stage, for this particular project I was working with the following stack: ![]() This is the story of how Oracle DB was messing up Kotlin’s type system, and what I did to fix it. ![]() ![]() H2, jpa, kotlin, npe, nulls, oracle, oracle-db, spring, spring-data
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |