Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ default JdbcMapping getSelectableType(MappingContext mappingContext, int index)

private JdbcMapping getType(MappingContext factory, Type elementType, int index) {
if ( elementType instanceof CompositeType compositeType ) {
final Type[] subtypes = compositeType.getSubtypes();
for ( int i = 0; i < subtypes.length; i++ ) {
final Type subtype = subtypes[i];
for ( final var subtype : compositeType.getSubtypes() ) {
final int columnSpan =
subtype instanceof EntityType entityType
? getIdType( entityType ).getColumnSpan( factory )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public TableGroupJoin createTableGroupJoin(
null,
creationState
);
return new TableGroupJoin( navigablePath, joinType, tableGroup, null );
return new TableGroupJoin( navigablePath, joinType, tableGroup );
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public TableGroupJoin createTableGroupJoin(
creationState
);

return new TableGroupJoin( navigablePath, joinType, tableGroup, null );
return new TableGroupJoin( navigablePath, joinType, tableGroup );
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,9 @@ public TableGroupJoin createTableGroupJoin(
creationState
);

final var join = new TableGroupJoin(
navigablePath,
joinType,
lazyTableGroup,
null
);
final var join = new TableGroupJoin( navigablePath, joinType, lazyTableGroup );

lazyTableGroup.setTableGroupInitializerCallback( (partTableGroup) -> {
lazyTableGroup.setTableGroupInitializerCallback( partTableGroup -> {
// `partTableGroup` is the association table group
join.applyPredicate(
foreignKey.generateJoinPredicate(
Expand Down Expand Up @@ -322,7 +317,9 @@ public LazyTableGroup createRootTableGroupJoin(
this,
explicitSourceAlias,
sqlAliasBase,
creationState.getCreationContext().getSessionFactory(),
creationState.getCreationContext()
// TODO: FIXME
.getSessionFactory(),
lhs
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ public TableGroupJoin createTableGroupJoin(
if ( mapKeyPropertyName != null ) {
final var elementPart =
(EntityCollectionPart)
getCollectionDescriptor().getAttributeMapping().getElementDescriptor();
getCollectionDescriptor().getAttributeMapping()
.getElementDescriptor();
if ( elementPart.getAssociatedEntityMappingType().findAttributeMapping( mapKeyPropertyName )
instanceof ToOneAttributeMapping toOne ) {
final var mapKeyPropertyPath = navigablePath.append( mapKeyPropertyName );
Expand All @@ -180,7 +181,7 @@ public TableGroupJoin createTableGroupJoin(
}
}

return new TableGroupJoin( navigablePath, joinType, elementTableGroup, null );
return new TableGroupJoin( navigablePath, joinType, elementTableGroup );
}

@Override
Expand Down
Loading