You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 !
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?
The text was updated successfully, but these errors were encountered: