Thanks, it works! Here's the snippet:
String cloneName = objEntity.getName() + "_no_qualifier";
ObjEntity clone = dataMap.getObjEntity(cloneName);
if (clone == null) {
clone = new ObjEntity(cloneName);
clone.setDbEntity(objEntity.getDbEntity());
objEntity.getDataMap().addObjEntity(clone);
}
Works on every Cayenne
2008/11/11, Andrus Adamchik <andru..bjectstyle.org>:
>
>
> On Nov 11, 2008, at 2:15 PM, Andrey Razumovsky wrote:
>
> ObjEntity clone = (ObjEntity) SerializationUtils.clone(objEntity);
>> clone.setDeclaredQualifier(null);
>> SelectQuery query = new SelectQuery(clone);
>>
>
> In addition you'll need to rename the entity and register it with the
> DataMap. So you might as well map an alt. entity via the Modeler.
>
> Or use a separate stack all together to work with a parallel set of
> entities without qualifiers.
>
> Andrus
>
>
>
>
>
This archive was generated by hypermail 2.0.0 : Tue Nov 11 2008 - 09:58:11 EST