Skip to content

Commit 257da01

Browse files
committed
start migrating to long paths
1 parent d0862bb commit 257da01

File tree

1 file changed

+5
-2
lines changed
  • spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping

1 file changed

+5
-2
lines changed

spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/AggregatePath.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ class ColumnInfos {
486486

487487
private final AggregatePath basePath;
488488
private final Map<AggregatePath, ColumnInfo> columnInfos;
489+
private final Map<AggregatePath, ColumnInfo> longColumnInfos;
489490
private final Map<Table, List<Column>> columnCache;
490491

491492
/**
@@ -499,6 +500,8 @@ class ColumnInfos {
499500

500501
this.basePath = basePath;
501502
this.columnInfos = columnInfos;
503+
this.longColumnInfos = new HashMap<>();
504+
columnInfos.forEach((ap, ci) -> longColumnInfos.put(fullPath(ap), ci));
502505
this.columnCache = new HashMap<>(columnInfos.size(), 1f);
503506
}
504507

@@ -657,7 +660,7 @@ public Iterable<AggregatePath> paths() {
657660
* @return {@literal true} iff the collection of {@literal ColumnInfo} is empty.
658661
*/
659662
public boolean isEmpty() {
660-
return columnInfos.isEmpty();
663+
return longColumnInfos.isEmpty();
661664
}
662665

663666
/**
@@ -666,7 +669,7 @@ public boolean isEmpty() {
666669
* @return the size of the collection of {@literal ColumnInfo}.
667670
*/
668671
public int size() {
669-
return columnInfos.size();
672+
return longColumnInfos.size();
670673
}
671674
}
672675

0 commit comments

Comments
 (0)