mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
PL-8697 If there are several nested datasources in parentDs any of them can be set as a parent for nested datasources of childDs (from https://github.com/cuba-platform/cuba/pull/13)
This commit is contained in:
parent
b00885846e
commit
9685c52526
@ -184,6 +184,7 @@ public abstract class AbstractDatasource<T extends Entity> implements Datasource
|
||||
// Look for corresponding property datasource in the Parent's DsContext
|
||||
for (Datasource siblingOfParent : parentDs.getDsContext().getAll()) {
|
||||
if (siblingOfParent instanceof NestedDatasource
|
||||
&& ((NestedDatasource) siblingOfParent).getProperty().equals(((NestedDatasource) sibling).getProperty())
|
||||
&& ((NestedDatasource) siblingOfParent).getMaster() == parentDs) {
|
||||
// If such corresponding datasource found, set it as a parent for our property datasource
|
||||
((DatasourceImplementation) sibling).setParent(siblingOfParent);
|
||||
|
Loading…
Reference in New Issue
Block a user