[
https://issues.apache.org/jira/browse/OFBIZ-5210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14043702#comment-14043702
]
Adam Heath commented on OFBIZ-5210:
-----------------------------------
Extending views just to add relations should be rather trivial to support.
Changing a view by adding additional members, aliases, links, and conditions,
would change the meaning of the view quite radically.
Nowadays, it should be possible to reference one view from another. Ie, a view
could have, as a member, another view. This can be done to almost infinite
depth. I updated the entityengine quite a bit ago to do the correct thing with
conditions on view-links(they stay on the link as you nest), and conditions on
view members(they become part of the outer view-link, not attached to the outer
where). I also added support for changing overly long field names, to an
effectively random string(I convert the systemHashCode() to a string,
basically).
So, if you need to have another view that just enhances one that already
exists, just create a new one, with a single member, and add whatever
conditions you need.
> view-entity cannot be extended
> ------------------------------
>
> Key: OFBIZ-5210
> URL: https://issues.apache.org/jira/browse/OFBIZ-5210
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: Release Branch 12.04
> Environment: Windows / Linux
> Reporter: Skip Dever
> Assignee: Adam Heath
> Priority: Minor
> Fix For: Release Branch 12.04
>
>
> For example, add the following to the bottom of entitymodel_view.xml in
> applications\workeffort\entitydef
> <extend-entity entity-name="WorkEffortAndPartyAssign">
> <relation type="one-nofk" title="Current"
> rel-entity-name="StatusItem">
> <key-map field-name="currentStatusId" rel-field-name="statusId"/>
> </relation>
> <relation type="one-nofk" rel-entity-name="WorkEffortType">
> <key-map field-name="workEffortTypeId"/>
> </relation>
> <relation type="one-nofk" rel-entity-name="WorkEffortPurposeType">
> <key-map field-name="workEffortPurposeTypeId"/>
> </relation>
> </extend-entity>
> Then, start Ofbiz and you will get an error in the log that
> WorkEffortAndPartyAssign does not exist.
--
This message was sent by Atlassian JIRA
(v6.2#6252)