[jira] [Comment Edited] (OFBIZ-11592) Have view entities show dynamic stamp fields of member entities

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Comment Edited] (OFBIZ-11592) Have view entities show dynamic stamp fields of member entities

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-11592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17080379#comment-17080379 ]

Pierre Smits edited comment on OFBIZ-11592 at 4/10/20, 9:48 AM:
----------------------------------------------------------------

A way to have this working could be to add additional meat to the member-entity in the dtd, e.g.
{code:java}
<xs:attribute name="add-stamps" default="false" type="xs:boolean"/>
{code}

which can then be added to appropriate view entity definitions, and have the underlying functions (ModelView?) add the field-value pairs to the set used.

An example of a view could then be:
{code:java}
<view-entity entity-name="PartyRoleAndPartyDetail"
            package-name="org.apache.ofbiz.party.party"
            title="Party Role and Party Detail (Person, PartyGroup, etc.) View">
      <member-entity entity-alias="PTY" entity-name="Party"/>
      <member-entity entity-alias="PR" entity-name="PartyRole"/>
      <member-entity entity-alias="PERSON" entity-name="Person"/>
      <member-entity entity-alias="PTYGRP" entity-name="PartyGroup"/>
      <alias-all entity-alias="PTY"/>
      <alias-all entity-alias="PR"/>
      <alias-all entity-alias="PERSON">
        <exclude field="comments"/>
       <include-stamps="true"/>
      </alias-all>
{code}






was (Author: pfm.smits):
A way to have this working could be to add additional meat to the member-entity in the dtd, e.g.
{code:java}
<xs:attribute name="add-stamps" default="false" type="xs:boolean"/>
{code}

which can then be added to appropriate view entity definitions, and have the underlying functions (ModelView?) add the field-value pairs to the set used.




> Have view entities show dynamic stamp fields of member entities
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-11592
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11592
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework/entity, framework/service, framework/webtools
>    Affects Versions: Trunk
>         Environment: *
>            Reporter: Pierre Smits
>            Assignee: Pierre Smits
>            Priority: Major
>              Labels: entity, entity-auto, view
>
> Currently the stamp fields of (normal) entity definitions are not defined in the entity models, and are added dynamically when the service engine creates the tables in the underlying RDBMS. And when records are retrieved (either in web tools or via specific functions) the service engine ensures that the stamp field values are retrieved from the table in the RDBMS.
> With view entities retrieval of stamp field values, however, this is not possible, due to:
> * view definitions are based on the defintion of member entities and these don't include stamp fields
> * views don't exist in the underlying RDBMS
> When accessing a view (accessed through web tools or functions) the values of the stamp fields of the underlying member (based on construct definitions) should be shown/retrievable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)