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 @@ -3584,6 +3584,8 @@ protected EntityTableMapping[] buildTableMappings() {
3584
3584
final TableMappingBuilder tableMappingBuilder ;
3585
3585
3586
3586
final TableMappingBuilder existing = tableBuilderMap .get ( tableExpression );
3587
+
3588
+ final boolean inverseTable = isInverseTable ( relativePosition );
3587
3589
if ( existing == null ) {
3588
3590
final Consumer <SelectableConsumer > selectableConsumerConsumer = tableKeyColumnVisitationSupplier .get ();
3589
3591
final List <EntityTableMapping .KeyColumn > keyColumns = new ArrayList <>();
@@ -3614,7 +3616,7 @@ protected EntityTableMapping[] buildTableMappings() {
3614
3616
relativePosition ,
3615
3617
new EntityTableMapping .KeyMapping ( keyColumns , identifierMapping ),
3616
3618
!isIdentifierTable && isNullableTable ( relativePosition ),
3617
- isInverseTable ( relativePosition ) ,
3619
+ inverseTable ,
3618
3620
isIdentifierTable ,
3619
3621
insertExpectations [ relativePosition ],
3620
3622
customInsertSql ,
@@ -3636,7 +3638,9 @@ protected EntityTableMapping[] buildTableMappings() {
3636
3638
tableMappingBuilder = existing ;
3637
3639
}
3638
3640
3639
- collectAttributesIndexesForTable ( relativePosition , tableMappingBuilder .attributeIndexes ::add );
3641
+ if ( !inverseTable ) {
3642
+ collectAttributesIndexesForTable ( relativePosition , tableMappingBuilder .attributeIndexes ::add );
3643
+ }
3640
3644
} );
3641
3645
3642
3646
final EntityTableMapping [] list = new EntityTableMapping [tableBuilderMap .size ()];
You can’t perform that action at this time.
0 commit comments