|
Additional issues, found so far:
1. AbstractEntityPersister#generateGeneratedValuesSelectString incorrectly used a single generationTimingToMatch. If ALWAYS, #generateInsertGeneratedValuesSelectString should receive both ALWAYS and INSERT columns, not just INSERT.
2. ALWAYS properties are not updateable nor insertable, as they should be. So, a DDL default value (ex: "CURRENT_TIMESTAMP") is used. This currently works for inserting. However, if you update the entity, I'd expect that value to be re-generated. Currently, it's simply left as-is. So realistically, INSERT == ALWAYS. The value is generated once on insert and then left alone. Forcing the DDL default to be re-kicked-off varies between DBs, so fixing this may be Dialect specific.
3. The original issue most likely was due to a single generated value, not specific to ALWAYS (AbstractEntityPersister#generateGeneratedValuesSelectString makes use of substring that appears to assume a ", " exists). Adding regression tests.
Steve Ebersole & Gunnar Morling, any other thoughts?
|