Author: jawi
Date: Thu Nov 7 10:59:32 2013
New Revision: 1539592
URL: http://svn.apache.org/r1539592
Log:
Small error fixed in the collecting of relations:
- only the first item of the selection was taken into account
because the loop was outside the checks whether or not a
particular table was already visited.
Modified:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java
Modified:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java?rev=1539592&r1=1539591&r2=1539592&view=diff
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java
(original)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/component/BaseObjectPanel.java
Thu Nov 7 10:59:32 2013
@@ -924,18 +924,20 @@ abstract class BaseObjectPanel<REPO_OBJ
// We've already visited this entity...
seenTypes.add(m_entityType);
- for (REPO_OBJ obj : selection) {
- if (direction.isGoLeft() && m_leftTable != null &&
!seenTypes.contains(m_leftTable.m_entityType)) {
- seenTypes.add(m_leftTable.m_entityType);
+ if (direction.isGoLeft() && m_leftTable != null &&
!seenTypes.contains(m_leftTable.m_entityType)) {
+ seenTypes.add(m_leftTable.m_entityType);
+ for (REPO_OBJ obj : selection) {
List<LEFT_ASSOC_REPO_OBJ> left =
obj.getAssociations(m_leftTable.m_entityType);
extractDefinitions(associated, left);
// the associated items of our left-side table are the ones
related to us...
m_leftTable.collectRelations(direction, left, seenTypes,
related, related);
}
- if (direction.isGoRight() && m_rightTable != null &&
!seenTypes.contains(m_rightTable.m_entityType)) {
- seenTypes.add(m_rightTable.m_entityType);
+ }
+ if (direction.isGoRight() && m_rightTable != null &&
!seenTypes.contains(m_rightTable.m_entityType)) {
+ seenTypes.add(m_rightTable.m_entityType);
+ for (REPO_OBJ obj : selection) {
List<RIGHT_ASSOC_REPO_OBJ> right =
obj.getAssociations(m_rightTable.m_entityType);
extractDefinitions(associated, right);
// the associated items of our right-side table are the ones
related to us...