Added a comment that tries to make clear the difference between isVirtual() and isCollection()
This commit is contained in:
parent
9e8f04aa4a
commit
45d32cc2da
1 changed files with 10 additions and 6 deletions
|
@ -350,7 +350,7 @@ public final class Relation {
|
||||||
cnst.addElement(new Constraint(local, foreign, false));
|
cnst.addElement(new Constraint(local, foreign, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse constraints logic
|
// parse constraints logic
|
||||||
if (cnst.size() > 1) {
|
if (cnst.size() > 1) {
|
||||||
String logic = props.getProperty(propName + ".logicalOperator");
|
String logic = props.getProperty(propName + ".logicalOperator");
|
||||||
|
@ -366,7 +366,7 @@ public final class Relation {
|
||||||
} else {
|
} else {
|
||||||
logicalOperator = AND;
|
logicalOperator = AND;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -393,7 +393,11 @@ public final class Relation {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if this Relation describes a collection object property
|
* Returns true if this Relation describes a collection.
|
||||||
|
* <b>NOTE:</b> this will return true both for collection objects
|
||||||
|
* (aka virtual nodes) and direct child object relations, so
|
||||||
|
* isVirtual() should be used to identify relations that define
|
||||||
|
* <i>collection properties</i>!
|
||||||
*/
|
*/
|
||||||
public boolean isCollection() {
|
public boolean isCollection() {
|
||||||
return reftype == COLLECTION;
|
return reftype == COLLECTION;
|
||||||
|
@ -443,7 +447,7 @@ public final class Relation {
|
||||||
if (otherType == null) {
|
if (otherType == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return virtual ||
|
return virtual ||
|
||||||
(otherType.isRelational() && accessName != null) ||
|
(otherType.isRelational() && accessName != null) ||
|
||||||
(groupby != null) || isComplexReference();
|
(groupby != null) || isComplexReference();
|
||||||
|
@ -872,7 +876,7 @@ public final class Relation {
|
||||||
}
|
}
|
||||||
q.append(')');
|
q.append(')');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
@ -896,7 +900,7 @@ public final class Relation {
|
||||||
if (filter != null) {
|
if (filter != null) {
|
||||||
appendFilter(q, nonvirtual, prefix);
|
appendFilter(q, nonvirtual, prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
return q.toString();
|
return q.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue