mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-18 00:55:16 +00:00
HHH-18583 Include identifier cols in persister's shared column names
This commit is contained in:
parent
42cf3b59f6
commit
37abf552c7
@ -687,6 +687,15 @@ public AbstractEntityPersister(
|
|||||||
final ArrayList<String[]> propColumnReaderTemplates = new ArrayList<>();
|
final ArrayList<String[]> propColumnReaderTemplates = new ArrayList<>();
|
||||||
final ArrayList<FetchMode> joinedFetchesList = new ArrayList<>();
|
final ArrayList<FetchMode> joinedFetchesList = new ArrayList<>();
|
||||||
|
|
||||||
|
if ( persistentClass.hasSubclasses() ) {
|
||||||
|
for ( Selectable selectable : persistentClass.getIdentifier().getSelectables() ) {
|
||||||
|
if ( !selectable.isFormula() ) {
|
||||||
|
// Identifier columns are always shared between subclasses
|
||||||
|
sharedColumnNames.add( ( (Column) selectable ).getQuotedName( dialect ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for ( Property prop : persistentClass.getSubclassPropertyClosure() ) {
|
for ( Property prop : persistentClass.getSubclassPropertyClosure() ) {
|
||||||
names.add( prop.getName() );
|
names.add( prop.getName() );
|
||||||
types.add( prop.getType() );
|
types.add( prop.getType() );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user