Make sure group node mappings have their last type change field set. This could lead to content nodes not being fetched.

This commit is contained in:
hns 2009-09-14 19:56:01 +00:00
parent 545a46a0a1
commit 67b705117a

View file

@ -758,7 +758,7 @@ public final class DbMapping {
* db-mapping with the right relations to create the group-by nodes * db-mapping with the right relations to create the group-by nodes
*/ */
public synchronized DbMapping getGroupbyMapping() { public synchronized DbMapping getGroupbyMapping() {
if ((subRelation == null) && (parentMapping != null)) { if (subRelation == null && parentMapping != null) {
return parentMapping.getGroupbyMapping(); return parentMapping.getGroupbyMapping();
} else if (subRelation == null || subRelation.groupby == null) { } else if (subRelation == null || subRelation.groupby == null) {
return null; return null;
@ -776,6 +776,7 @@ public final class DbMapping {
// if a prototype is defined for groupby nodes, use that // if a prototype is defined for groupby nodes, use that
// if mapping doesn' exist or isn't defined, create a new (anonymous internal) one // if mapping doesn' exist or isn't defined, create a new (anonymous internal) one
groupbyMapping = new DbMapping(app, subRelation.groupbyPrototype); groupbyMapping = new DbMapping(app, subRelation.groupbyPrototype);
groupbyMapping.lastTypeChange = this.lastTypeChange;
groupbyMapping.isGroup = true; groupbyMapping.isGroup = true;
// set subnode and property relations // set subnode and property relations