Hi,

I would like to create two dynamic views and link with together. It is possible? I try like this:

// Currently the following view can be replaced by entity
// but I assume that it will be more complex.
final DynamicViewEntity productFacilityView = new DynamicViewEntity();
productFacilityView.addMemberEntity("PF", "ProductFacility");
productFacilityView.addAliasAll("PF", "", new LinkedList<>());

final DynamicViewEntity view = new DynamicViewEntity();
view.addMemberEntity("PRD", "Product");
view.addMemberEntity("PF", productFacilityView.getEntityName());
view.addAliasAll("PRD", "", new LinkedList<>());

final ModelKeyMap modelKeyMap = new ModelKeyMap("productId", "productId");
final List<ModelKeyMap> maps = new LinkedList<>();
maps.add(modelKeyMap);
view.addViewLink("PRD", "PF", false, maps);
final List<GenericValue> list = EntityQuery.use(delegator).from(view).queryList();

But it does not work.

Tomek

Reply via email to