INSERT time in-db generated properties not persisted with IDENTITY insert

Description

It seems that in-DB generated columns are not passed into the Indentity Insert query of the entity persister. For example the FunctionCreationTimestamp from the http://docs.jboss.org/hibernate/orm/4.3/topical/html/generated/GeneratedValues.html documentation, does not insert on an update for an entity with a @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id column. It does work however with GenerationType.AUTO.

The problem seems to be the inconsistency between generateIdentityInsertString and generateInsertString .

One adds the normal properties as follows:

Whereas the others does something way less sophisticated:

Is there a technical reason why INSERT time in-db generated values are not supported with Identity insert, or this this a slight oversight?

Environment

None

Activity

Show:
Jan-Willem Gmelig Meyling
June 7, 2018, 4:53 PM
Vlad Mihalcea
June 18, 2018, 8:44 AM

Applied PR upstream

Assignee

Vlad Mihalcea

Reporter

Jan-Willem Gmelig Meyling

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure