Looking at `InsertStatement.generatedKey`. Is ther...
# exposed
s
Looking at
InsertStatement.generatedKey
. Is there any particular usecase that isnt better handled by
get()
? With
get()
you get the correct type, while with
generatedKey
you need to
toInt()
it or similar. Asking as I would prefer to see it removed since I see some bad usages of it in our codebase.
t
I think that it's rather rare when you have to ask
generatedKey
in your code. At first, if you use
IdTable.insertAndGetId
then you'll receive id value of proper type. So I agree that
generatedKey
looks like a legacy and could be hidden from a public scope. But (as you mentioned) many people already use that field and it may be too painful to just to remove the field but we can start with depreciation.
s
Good to hear you agree. Deprecation seems like a good first step.