[jira] Created: (OFBIZ-1232) Data filtering in entity views

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

[jira] Created: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
Data filtering in entity views
------------------------------

                 Key: OFBIZ-1232
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
             Project: OFBiz
          Issue Type: New Feature
          Components: framework
    Affects Versions: SVN trunk
            Reporter: Oscar Pablo
            Priority: Minor
             Fix For: SVN trunk


OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it allows workarounds and a cleaner code.

The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following sintax:

<filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>

these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.

I am attaching the xsd and the code I made...




--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oscar Pablo updated OFBIZ-1232:
-------------------------------

    Attachment: filter_views.diff

Code to add the tag <filter> to a view definition.

Affects:
- DynamicViewEntity (it is possible to define filters in a DynamicEntity)
- ModelViewEntity (xml parsing)
- SqlJdbcUtil (sql query creation)
- entitymodel.xsd (view definition)



> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it allows workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following sintax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oscar Pablo updated OFBIZ-1232:
-------------------------------

    Description:
OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.

The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following sintax:

<filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>

these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.

I am attaching the xsd and the code I made...




  was:
OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it allows workarounds and a cleaner code.

The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following sintax:

<filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>

these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.

I am attaching the xsd and the code I made...





> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following sintax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oscar Pablo updated OFBIZ-1232:
-------------------------------

    Description:
OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.

The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:

<filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>

these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.

I am attaching the xsd and the code I made...




  was:
OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.

The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following sintax:

<filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>

these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.

I am attaching the xsd and the code I made...





> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jonathon Wong commented on OFBIZ-1232:
--------------------------------------

This works too. My own implementation puts it in the <view-link>, and the "filter condition" can only be applied to either (one or both) tables being joined by the <view-link>.

That way, it makes for cleaner entitymodel.xml definitions, and we don't easily end up with redundant or duplicate "filter conditions" like when using <filter>.

A good practice to ensure clean codes in entitymodel.xml, if you're using my approach, is to always add the "filter condition" only for the "2nd table being joined". That is, the "rel-entity-alias". That is assuming you also do the good practice of constructing your <view-entity> in a strict and clean top-down hierarchy!

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Oscar Pablo commented on OFBIZ-1232:
------------------------------------

By using the tag <filter> to enter filter conditions, we are not binding the filtering to the join. That is, we can apply a filter even on a single table view. Using the filter tag inside or bound to the <view-link> tag makes the user define a view link to be able to define a filter.

Control over "filter conditions" to avoid redundant filters I think is not a critical thing, cause developer/designer can easily control that. And, by the way, if not controlled, it doesn't cause an error.

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jonathon Wong commented on OFBIZ-1232:
--------------------------------------

> By using the tag <filter> to enter filter conditions, we are not binding the
> filtering to the join. That is, we can apply a filter even on a single table
> view.

Why would there be a single table view?

> Using the filter tag inside or bound to the <view-link> tag makes the user
> define a view link to be able to define a filter.

The main motivation for my putting it in the <view-link> tag is this. I want cross-products that are semantically meaningful.

For eg, you may have a view that consists of "Person, Person's Employer, and Person's Subordinates". Note that the table Person is joined 3 times. With conditions in the joins (<view-link>), it will be possible to have a cross-product like this:

Person (partyId, firstName, lastName), Person's Employer (empPartyId, empFirstName, empLastName), Person's Subordinate (subPartyId, subFirstName, subLastName).

Without conditions in the joins, the cross-product will be a massive and rather meaningless one.

Any other conditions or filters can be done during the query, and may not be required to semantically define a view. At least that is the case for how I intended to use it.

> Control over "filter conditions" to avoid redundant filters I think is not a
> critical thing, cause developer/designer can easily control that. And, by the
> way, if not controlled, it doesn't cause an error.

True. Putting <filter> tags in a single location in the <entity> element will make it easy enough to avoid duplicates.

New suggestion. Include the conditionals in the <alias> element, attribute "value".

Also, include your <filter> tag as a sub-element in the <alias-all> element.

Still, your top-level <filter> element is most flexible, and easiest to implement. We can roll with that. I vote for it.

This change is additive, and shouldn't affect existing functionalities.

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Oscar Pablo commented on OFBIZ-1232:
------------------------------------

>> By using the tag <filter> to enter filter conditions, we are not binding the
>> filtering to the join. That is, we can apply a filter even on a single table
>> view.

>Why would there be a single table view?

You're right. I misunderstood the behaviour of this. Forget my comment. The idea behind all this is: if an entity is involved in more than one join, it could be confusing to place the filter inside "view-link", as it can be inside one link or the other. Also, it can be information on both links. Do we parse both filters? yes, but this increases the difficulty parsing the XML and decreases the understandability of the XML

>> Using the filter tag inside or bound to the <view-link> tag makes the user
>> define a view link to be able to define a filter.

>The main motivation for my putting it in the <view-link> tag is this. I want cross-products that are semantically meaningful.

>For eg, you may have a view that consists of "Person, Person's Employer, and Person's Subordinates". Note that the table Person is >joined 3 times. With conditions in the joins (<view-link>), it will be possible to have a cross-product like this:

>Person (partyId, firstName, lastName), Person's Employer (empPartyId, empFirstName, empLastName), Person's Subordinate >(subPartyId, subFirstName, subLastName).

>Without conditions in the joins, the cross-product will be a massive and rather meaningless one.

>Any other conditions or filters can be done during the query, and may not be required to semantically define a view. At least that is >the case for how I intended to use it.

The filter tag uses the entity-alias to solve this situation. Both things have the same effect (using "filter" tag or putting it inside "view-link" tab). It's just a matter of sepparating "responsibilities": one tag for joining and another for filtering. Also, the parsing is easier.

>> Control over "filter conditions" to avoid redundant filters I think is not a
>> critical thing, cause developer/designer can easily control that. And, by the
>> way, if not controlled, it doesn't cause an error.

>True. Putting <filter> tags in a single location in the <entity> element will make it easy enough to avoid duplicates.

>New suggestion. Include the conditionals in the <alias> element, attribute "value".

>Also, include your <filter> tag as a sub-element in the <alias-all> element.

>Still, your top-level <filter> element is most flexible, and easiest to implement. We can roll with that. I vote for it.

>This change is additive, and shouldn't affect existing functionalities.

It seems we both agree in this point :)

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-1232:
--------------------------------------

    Assignee: Jacques Le Roux

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-1232:
----------------------------------------

I like this idea, I hope to  do a review soon (with OFBIZ-1252 also)

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux updated OFBIZ-1232:
-----------------------------------

    Attachment: filter_views.patch

An updated patch (merged by hand with TortoiseMerge help)

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff, filter_views.patch
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux updated OFBIZ-1232:
-----------------------------------

    Attachment: filter_views.patch

Better version with generic and fix a bug I introduced. If nobofy see a problem with this patch I will commit it

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff, filter_views.patch, filter_views.patch
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1232.
----------------------------------

    Resolution: Fixed

Thanks Oscar and Jonathon for test and comments,

A merged and modified patch is committed in trunk revision: 707216  


> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff, filter_views.patch, filter_views.patch
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Reopened: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reopened OFBIZ-1232:
------------------------------------


Finally on Adam and David's advices I have reverted in revision: 707830.

To understand why please read [this thread|http://www.nabble.com/Re%3A-svn-commit%3A-r707216---in--ofbiz-trunk-framework-entity%3A-dtd-entitymodel.xsd-src-org-ofbiz-entity-jdbc-SqlJdbcUtil.java-src-org-ofbiz-entity-model-DynamicViewEntity.java-src-org-ofbiz-entity-model-ModelViewEntity.java-td20136119.html#a20150522]

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff, filter_views.patch, filter_views.patch
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-1232:
----------------------------------------

Any news Adam ?

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff, filter_views.patch, filter_views.patch
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-1232) Data filtering in entity views

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-1232:
--------------------------------------

    Assignee: Adam Heath  (was: Jacques Le Roux)

> Data filtering in entity views
> ------------------------------
>
>                 Key: OFBIZ-1232
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1232
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Oscar Pablo
>            Assignee: Adam Heath
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: filter_views.diff, filter_views.patch, filter_views.patch
>
>
> OfBiz allows the creation of views based on the database model. But the data selection is done only by join. It would be great to select the data also by value. And, in some cases, it avoids workarounds and a cleaner code.
> The proposal is to create a new tag inside view-entity tag from entitymodel.xml with the following syntax:
> <filter entity-alias="<table_alias>" field-name="<field_name>" operator="<operator:equals, not-equals, like...>" value="<value_to_select>"/>
> these tag could appear from 0 to N times. When N times, all filter criteria must match with the data to select it.
> I am attaching the xsd and the code I made...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.