You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by stamilo <st...@gmail.com> on 2008/07/23 07:54:35 UTC

left join and condition

hi,
  i want to define a view like this:

 select * from tablea a left join ( select * from tableb where f_deleted =
0) b
on a.id = b.id

but i only can define like this:
 select * from tablea a left join table b
on a.id = b.id

when i add a where condition  where f_deleted=0  , .. the result is
different  :(


 i can't find any info about that in entity engine guide,
 there is no where condition tag,

 how i can ?

 thx!

Re: left join and condition

Posted by stamilo <st...@gmail.com>.
thanks!


On Sat, Jul 26, 2008 at 3:09 PM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> You can't : http://ofbiz.apache.org/docs/entity.html#View_Entity_Modeling
> Have a look at
> http://www.nabble.com/forum/Search.jtp?local=y&forum=2740&query=where+in+entity+view
> This is for instance what you may have found with such a search
> http://www.nabble.com/-OFBiz--Dev---How-to-filter-a-field-in-a-%3Cview-entity%3E-td570945.html#a570945
>
> Jacques
>
> From: "stamilo" <st...@gmail.com>
>
>  hi,
>>  i want to define a view like this:
>>
>> select * from tablea a left join ( select * from tableb where f_deleted =
>> 0) b
>> on a.id = b.id
>>
>> but i only can define like this:
>> select * from tablea a left join table b
>> on a.id = b.id
>>
>> when i add a where condition  where f_deleted=0  , .. the result is
>> different  :(
>>
>>
>> i can't find any info about that in entity engine guide,
>> there is no where condition tag,
>>
>> how i can ?
>>
>> thx!
>>
>>
>

Re: left join and condition

Posted by Jacques Le Roux <ja...@les7arts.com>.
You can't : http://ofbiz.apache.org/docs/entity.html#View_Entity_Modeling
Have a look at http://www.nabble.com/forum/Search.jtp?local=y&forum=2740&query=where+in+entity+view
This is for instance what you may have found with such a search 
http://www.nabble.com/-OFBiz--Dev---How-to-filter-a-field-in-a-%3Cview-entity%3E-td570945.html#a570945

Jacques

From: "stamilo" <st...@gmail.com>
> hi,
>  i want to define a view like this:
>
> select * from tablea a left join ( select * from tableb where f_deleted =
> 0) b
> on a.id = b.id
>
> but i only can define like this:
> select * from tablea a left join table b
> on a.id = b.id
>
> when i add a where condition  where f_deleted=0  , .. the result is
> different  :(
>
>
> i can't find any info about that in entity engine guide,
> there is no where condition tag,
>
> how i can ?
>
> thx!
>