adding condition to view-entity defination !

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

adding condition to view-entity defination !

prashant punekar
Hi,

Even after adding the condition to the view entity, it seems that the condition is not being taken into consideration.
When we query the view, we get all the records irrespective of the condition added in the view definition.

Here is the view definition:

      <view-entity entity-name="pjMerchandizeCardsAndInventoryItem"
            package-name="com.pj.wallet">
                  <member-entity entity-alias="invitem" entity-name="InventoryItem"/>
                  <member-entity entity-alias="merchandize" entity-name="pjMerchandizeCards" />
                  <alias-all entity-alias="invitem">
                        <exclude field="lastUpdatedStamp"/>
                  </alias-all>

                  <alias-all entity-alias="merchandize">
                        <exclude field="productId"/>
                  </alias-all>
                  <alias name="lastUpdatedStamp" entity-alias="merchandize" field="lastUpdatedStamp"></alias>
                  <view-link entity-alias="invitem" rel-entity-alias="merchandize">
                        <key-map field-name="productId"/>
                  </view-link>
<entity-condition>
                        <condition-expr entity-alias="merchandize" field-name="displayOnWeb" operator="equals" value="Y"/>
                  </entity-condition>
      </view-entity>

I also tried adding the condition in the <view-link> tag. Please note that only one table has the column "displayOnWeb".

Any comments ?

Regards,
Prashant

________________________________
http://www.mindtree.com/email/disclaimer.html
Reply | Threaded
Open this post in threaded view
|

Re: adding condition to view-entity defination !

Rishi Solanki
Hi Prashant,
In general the definition should work, I do not see any thing strange
setting here. All izz Well :-).
Can you please give the other entity definitions except 'InventoryItem'
which you are using to create this view so can look on it.

Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Tue, May 18, 2010 at 5:24 AM, Prashant Punekar <
[hidden email]> wrote:

> Hi,
>
> Even after adding the condition to the view entity, it seems that the
> condition is not being taken into consideration.
> When we query the view, we get all the records irrespective of the
> condition added in the view definition.
>
> Here is the view definition:
>
>      <view-entity entity-name="pjMerchandizeCardsAndInventoryItem"
>            package-name="com.pj.wallet">
>                  <member-entity entity-alias="invitem"
> entity-name="InventoryItem"/>
>                  <member-entity entity-alias="merchandize"
> entity-name="pjMerchandizeCards" />
>                  <alias-all entity-alias="invitem">
>                        <exclude field="lastUpdatedStamp"/>
>                  </alias-all>
>
>                  <alias-all entity-alias="merchandize">
>                        <exclude field="productId"/>
>                  </alias-all>
>                  <alias name="lastUpdatedStamp" entity-alias="merchandize"
> field="lastUpdatedStamp"></alias>
>                  <view-link entity-alias="invitem"
> rel-entity-alias="merchandize">
>                        <key-map field-name="productId"/>
>                  </view-link>
> <entity-condition>
>                        <condition-expr entity-alias="merchandize"
> field-name="displayOnWeb" operator="equals" value="Y"/>
>                  </entity-condition>
>      </view-entity>
>
> I also tried adding the condition in the <view-link> tag. Please note that
> only one table has the column "displayOnWeb".
>
> Any comments ?
>
> Regards,
> Prashant
>
> ________________________________
> http://www.mindtree.com/email/disclaimer.html
>