Skip to content

Commit 4efcfd3

Browse files
committed
优化 Join.isOne2Many 判断性能
1 parent 1e7f38e commit 4efcfd3

File tree

1 file changed

+1
-1
lines changed
  • APIJSONORM/src/main/java/apijson/orm

1 file changed

+1
-1
lines changed

APIJSONORM/src/main/java/apijson/orm/Join.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public boolean isOne2One() {
109109
return ! isOne2Many();
110110
}
111111
public boolean isOne2Many() {
112-
return path != null && path.contains("[]"); // TODO 必须保证一对一时不会传包含 [] 的 path
112+
return count != 1 || (path != null && path.contains("[]")); // TODO 必须保证一对一时不会传包含 [] 的 path
113113
}
114114

115115
public boolean isAppJoin() {

0 commit comments

Comments
 (0)