view entity

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

view entity

sreejithpallikkara
Hi
I am a fresher to Ofbiz, I want to create view entity for the following SQL Query,

create view newView as (SELECT pr_id FROM span_purchase_request where pr_id not in(SELECT distinct pr_id FROM span_request_for_quotation))\


I have tried it in Ofbiz, but not able to get the propper output.

Plaese help me on this...


Thanks & Regards
Sreejith P
Reply | Threaded
Open this post in threaded view
|

Re: view entity

Sakthivel Vellingiri
View entity in ofbiz does not represent database view; It is an entity
created at runtime based on the configuration in
<view-entity></view-entity>; Consider these as join queries if you
will; Look for the view-entity configurations in entitymodel_view.xml
in the relevant application

- Sakthi

On 12/7/11, sreejithpallikkara <[hidden email]> wrote:

> Hi
> I am a fresher to Ofbiz, I want to create view entity for the following SQL
> Query,
>
> create view newView as (SELECT pr_id FROM span_purchase_request where pr_id
> not in(SELECT distinct pr_id FROM span_request_for_quotation))\
>
>
> I have tried it in Ofbiz, but not able to get the propper output.
>
> Plaese help me on this...
>
>
> Thanks & Regards
> Sreejith P
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/view-entity-tp4169000p4169000.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

--
Sent from my mobile device
Reply | Threaded
Open this post in threaded view
|

Re: view entity

Rakesh_Ists
In reply to this post by sreejithpallikkara
you can create view into ofbiz using <view-entity></view-entity>.
you can write it into entity-model.xml file of your application.
view will be get generated at runtime, there is no existance of it into database.
in ofbiz view you can create using inner query, so, therefore change you query using only joins, that will work out for you.

 If you are not able create, let me know the structure of table , i will give the view need to be created.