Closed joseluisgs closed 7 months ago
Hello @joseluisgs
Thanks for submitting this proposal, I understand your point of view.
For me a nullable id for an autoincrement column is the natural way to go : it's null unless you affect a value yourself or it's returned from a insertAndReturn
call, this null value has a clear meaning that your entity was not inserted yet.
But nothing prevent me to allow autoIncrement
for non nullable columns too, I would have to ignore the column value if it is <= 0 to let the database generate a value in this case.
I add it to the roadmap !
Hi @joseluisgs This feature is included in the latest 3.2.2 version that was released yesterday
@pull-vert Thank you very much! You are the best!
One of the best things about using Kotlin is being able to work with nulls safely.
I wanted to know, if I can work with autoIncrement directly in my model without the need to make id nullable.
Other frameworks use for example -1 or 0.
I think it's better to avoid comparison problems later or use !!.
Currently I solve it using a another bridge class, but I find it unnecessary if a non-null default value can be used.
Is there another possibility?