Re: [OFBiz] Dev - How to filter a field in a <view-entity>

Posted by Adam Heath-2 on
URL: http://ofbiz.116.s1.nabble.com/OFBiz-Dev-How-to-filter-a-field-in-a-view-entity-tp165825p165829.html

On Mon, 8 Aug 2005, Chris Howe wrote:

> Why would you want to do it from the entity-model?  What advantagewould that have over a the generic java classes from the delegator?

So if you change the model, you don't have to find all the code and change it
as well.

Consider the case when you are joining thru a fromDate/thruDate; if the model
system supported model conditions, then you would have a central location for
maintaining these queries, instead of scattered thruout the code.

Also, here's a few more ideas we've kicked around here:

==

GenericValue value = delegator.findByPrimaryKeyCache(name, keys);
value.run("procedure", data);

==

List values = delegator.runQueryCache("MyLookupQuery");

==

These ideas stem from separating code into multiple tiers; placing the
queries/conditions into separate files lets you separate the model even more.
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev