spicyspiders
09/17/2019, 2:19 AM@Column(nullable = false)
val locationId: String?,
- if the db schema defines not null, does it make sense to mark the data class field as nullable? What is the behaviour in such a case?Amirul Zin
09/17/2019, 2:24 AMspicyspiders
09/17/2019, 2:25 AMAmirul Zin
09/17/2019, 3:16 AMAny?
compiles to a null check and throwing exception if it wasn’t null. The performance impact is barely there (next to nil) since its just basic boolean logic but the overhead does exist.
In contrast, the programming overhead of handling T
vs T?
is up to you, the human 👨💻karelpeeters
09/17/2019, 6:23 AM