mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
always add main ID property, if no foreign key (=noConstraint) is present
(cherry picked from commit ea562151a8e3043df13381abd0d076d592618340)
This commit is contained in:
1 parent
53f1da32be
commit
081cb20260
3 files changed
+66
-18
No files matched your search
@@ -248,10 +248,14 @@ public final class SqlTreeBuilder {
|
||||
|
||||
List<SqlTreeNode> myJoinList = new ArrayList<>();
|
||||
|
||||
List<STreePropertyAssocOne> extraProps = new ArrayList<>();
|
||||
for (STreePropertyAssocOne one : desc.propsOne()) {
|
||||
String propPrefix = SplitName.add(prefix, one.getName());
|
||||
if (isIncludeBean(propPrefix)) {
|
||||
selectIncludes.add(propPrefix);
|
||||
if (!one.hasForeignKey()) {
|
||||
extraProps.add(one);
|
||||
}
|
||||
buildSelectChain(propPrefix, one, one.target(), myJoinList);
|
||||
}
|
||||
}
|
||||
@@ -273,6 +277,7 @@ public final class SqlTreeBuilder {
|
||||
}
|
||||
addManyWhereJoins(myJoinList);
|
||||
}
|
||||
extraProps.forEach(props::add);
|
||||
|
||||
SqlTreeNode selectNode = buildNode(prefix, prop, desc, myJoinList, props);
|
||||
if (joinList != null) {
|
||||
|
||||
Reference in new issue
Block a user