Skip to content

Commit

Permalink
HHH-15658 Embeddable with more fields than the parent fails with Inde…
Browse files Browse the repository at this point in the history
…x out of Bounds
  • Loading branch information
dreab8 committed Nov 22, 2022
1 parent 934bde2 commit 2d44219
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2027,17 +2027,14 @@ else if ( fetchable instanceof Association ) {
}

private boolean isSelectable(FetchParent fetchParent, Fetchable fetchable) {
if ( fetchable instanceof AttributeMapping ) {
if ( fetchParent instanceof EmbeddableResultGraphNode
&& ( (EmbeddableResultGraphNode) fetchParent).getReferencedMappingContainer() == getIdentifierMapping() ) {
return true;
}
else {
final int propertyNumber = ( (AttributeMapping) fetchable).getStateArrayPosition();
if ( fetchParent instanceof EmbeddableResultGraphNode ) {
return true;
}
else if ( fetchable instanceof AttributeMapping ) {
final int propertyNumber = ( (AttributeMapping) fetchable ).getStateArrayPosition();
// final int tableNumber = getSubclassPropertyTableNumber( propertyNumber );
// return !isSubclassTableSequentialSelect( tableNumber ) && propertySelectable[propertyNumber];
return propertySelectable[propertyNumber];
}
return propertySelectable[propertyNumber];
}
else {
return true;
Expand Down

0 comments on commit 2d44219

Please sign in to comment.