You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Chatree Srichart <ch...@gmail.com> on 2010/03/09 03:43:21 UTC

Define view-entity with SQL statement.

Is it possible if I need to define view-entity with SQL statement because I
need to use NESTED SELECT statement?

Re: Define view-entity with SQL statement.

Posted by Hans Bakker <ma...@antwebsystems.com>.
Please do not post in both mailing lists. I have answered your question
in the user mailing list.

On Tue, 2010-03-09 at 09:43 +0700, Chatree Srichart wrote:
> Is it possible if I need to define view-entity with SQL statement because I
> need to use NESTED SELECT statement?
-- 
Antwebsystems.com: Quality OFBiz services for competitive rates


Re: Define view-entity with SQL statement.

Posted by Adam Heath <do...@brainfood.com>.
Chatree Srichart wrote:
> Is it possible if I need to define view-entity with SQL statement because I
> need to use NESTED SELECT statement?

A view entity can reference another view entity as a member-entity.


Re: Define view-entity with SQL statement.

Posted by Scott Gray <sc...@hotwaxmedia.com>.
It should be possible to construct the same view with a static view entity definition as it is with a DynamicViewEntity, the only difference between the two is the dynamic nature of the latter i.e. you can construct the view at runtime to only query the data you actually need.

Regards
Scott

On 8/03/2010, at 7:56 PM, Hans Bakker wrote:

> View entities are not created in the database. They are used for the sql
> queries generated by OFBiz using the OFBiz view definition.
> 
> Dynamic views could be an answer here. An example you can find in the
> ProductSearch.java file and search for 'DynamicViewEntity'
> 
> Regards,
> Hans
> 
> -- 
> Antwebsystems.com: Quality OFBiz services for competitive rates
> 
> On Tue, 2010-03-09 at 09:43 +0700, Chatree Srichart wrote:
>> Is it possible if I need to define view-entity with SQL statement because I
>> need to use NESTED SELECT statement?
> 
> 


Re: Define view-entity with SQL statement.

Posted by Hans Bakker <ma...@antwebsystems.com>.
View entities are not created in the database. They are used for the sql
queries generated by OFBiz using the OFBiz view definition.

Dynamic views could be an answer here. An example you can find in the
ProductSearch.java file and search for 'DynamicViewEntity'

Regards,
Hans

-- 
Antwebsystems.com: Quality OFBiz services for competitive rates

On Tue, 2010-03-09 at 09:43 +0700, Chatree Srichart wrote:
> Is it possible if I need to define view-entity with SQL statement because I
> need to use NESTED SELECT statement?