I'm doing some debugging of cross-DataMap relationship resolving problems,
and here's what I've found:
Evaluating ${rel.TargetEntity.ClassName} calls:
public Entity getTargetEntity() {
String targetName = getTargetEntityName();
if (targetName == null) {
return null;
}
return getNonNullNamespace().getObjEntity(targetName);
}
However, getNonNullNamespace() calls
getSourceEntity().getNonNullNamespace(), which is in the source DataMap
rather than the target DataMap.
Now, if the objEntityName isn't found in the objEntityMap for the DataMap,
it's supposed to look in the DataMap.namespace.
public ObjEntity getObjEntity(String objEntityName) {
ObjEntity entity = (ObjEntity) objEntityMap.get(objEntityName);
if (entity != null) {
return entity;
}
return namespace != null ? namespace.getObjEntity(objEntityName) :
null;
}
At least for cgen, the source Datamap namespace is null. I'm guessing this
is somehow the problem.
Do I need to manually build a "namespace" implementation that spans all of
the DataMaps provided to cgen?
Actually, I see that EntityResolver implements MappingNamespace. When I
create EntityUtils's EntityResolver, should I also set each DataMap's
namespace variable to the entityResolver created?
-Mike
This archive was generated by hypermail 2.0.0 : Tue Jun 14 2005 - 11:58:21 EDT