Skip to content

Commit

Permalink
HHH-18384 Changes after PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cigaly committed Nov 21, 2024
1 parent 3f6d7a5 commit f0a2a4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@ private static PropertyData getUniqueIdPropertyFromBaseClass(
inferredData.getPropertyType(),
propertyAccessor
);
addElementsOfClass( baseClassElements, propContainer, context, 0 );
final int idPropertyCount = addElementsOfClass( baseClassElements, propContainer, context, 0 );
assert idPropertyCount == 1;
//Id properties are on top and there is only one
return baseClassElements.get( 0 );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ private void validateOptimisticLock(boolean excluded) {
* @param propertyContainer Metadata about a class and its properties
* @param idPropertyCounter number of id properties already present in list of {@link PropertyData} instances
*
* @return total number of id properties found after iterating the elements of
* {@code annotatedClass} using the determined access strategy
* @return total number of id properties found after iterating the elements of {@code annotatedClass}
* using the determined access strategy (starting from the provided {@code idPropertyCounter})
*/
static int addElementsOfClass(
List<PropertyData> elements,
Expand All @@ -602,7 +602,8 @@ private static int addProperty(
PropertyContainer propertyContainer,
MemberDetails property,
List<PropertyData> inFlightPropertyDataList,
MetadataBuildingContext context, int idPropertyCounter) {
MetadataBuildingContext context,
int idPropertyCounter) {
// see if inFlightPropertyDataList already contains a PropertyData for this name,
// and if so, skip it...
for ( PropertyData propertyData : inFlightPropertyDataList ) {
Expand Down

0 comments on commit f0a2a4b

Please sign in to comment.