File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
hibernate-core/src/main/java/org/hibernate/persister/entity Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3547,6 +3547,8 @@ protected EntityTableMapping[] buildTableMappings() {
3547
3547
final TableMappingBuilder tableMappingBuilder ;
3548
3548
3549
3549
final TableMappingBuilder existing = tableBuilderMap .get ( tableExpression );
3550
+
3551
+ final boolean inverseTable = isInverseTable ( relativePosition );
3550
3552
if ( existing == null ) {
3551
3553
final Consumer <SelectableConsumer > selectableConsumerConsumer = tableKeyColumnVisitationSupplier .get ();
3552
3554
final List <EntityTableMapping .KeyColumn > keyColumns = new ArrayList <>();
@@ -3577,7 +3579,7 @@ protected EntityTableMapping[] buildTableMappings() {
3577
3579
relativePosition ,
3578
3580
new EntityTableMapping .KeyMapping ( keyColumns , identifierMapping ),
3579
3581
!isIdentifierTable && isNullableTable ( relativePosition ),
3580
- isInverseTable ( relativePosition ) ,
3582
+ inverseTable ,
3581
3583
isIdentifierTable ,
3582
3584
insertExpectations [ relativePosition ],
3583
3585
customInsertSql ,
@@ -3599,7 +3601,9 @@ protected EntityTableMapping[] buildTableMappings() {
3599
3601
tableMappingBuilder = existing ;
3600
3602
}
3601
3603
3602
- collectAttributesIndexesForTable ( relativePosition , tableMappingBuilder .attributeIndexes ::add );
3604
+ if ( !inverseTable ) {
3605
+ collectAttributesIndexesForTable ( relativePosition , tableMappingBuilder .attributeIndexes ::add );
3606
+ }
3603
3607
} );
3604
3608
3605
3609
final EntityTableMapping [] list = new EntityTableMapping [tableBuilderMap .size ()];
You can’t perform that action at this time.
0 commit comments