|
The intent of isGeneratedInDatabase is to indicate whether a read from the database is needed after the INSERT/UPDATE. In this regard there are 2 cases:
-
There is a "value generator" and the value is known in-VM before we execute the INSERT/UPDATE.
-
There is not a "value generator" and the value is not known until after INSERT/UPDATE execution.
An alternative way to structure this is to invert getVmGeneratedValue (where I forgot to put the args in my gist) to instead be a method to get the "value generator", where a null return would indicate the same condition as isGeneratedInDatabase.
|