You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Bruno Busco <br...@gmail.com> on 2008/10/24 23:15:29 UTC

Unable to sort by lastUpdatedStamp in groovy files

Hi,
I am trying to sort by lastUpdatedStamp in a groovy file but I get an error:

My groovy file is:

// Get all Portlets located on the selected PortalPage
orderBy = ["columnNum", "rowNum", "lastUpdatedStamp"];
portletList = delegator.findList("PortletAndPortalPagePortlet",
EntityCondition.makeCondition([portalPageId : portalPageId]), null, orderBy,
null, false);

and I get:
(Field with name lastUpdatedStamp not found in the
PortletAndPortalPagePortlet Entity)


Browsing the OFBiz code it seems that sorting by this "embedded" fields is
possible in the forms actions <order-by/> tag.

Could it be possible to have it working in groovy  files also? Does it make
sense?

Many thanks,
Bruno

Re: Unable to sort by lastUpdatedStamp in groovy files

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Bruno,

Certainly because lastUpdatedStamp is not known as a part of the entity by the Entity Engine. Not sure why it's allowed in minilang 
and how it's done (no time for details)
Can you see what is rendering the message  (Field with name lastUpdatedStamp not found in the PortletAndPortalPagePortlet Entity) in 
log ?

Jacques

From: "Bruno Busco" <br...@gmail.com>
> Hi,
> I am trying to sort by lastUpdatedStamp in a groovy file but I get an error:
>
> My groovy file is:
>
> // Get all Portlets located on the selected PortalPage
> orderBy = ["columnNum", "rowNum", "lastUpdatedStamp"];
> portletList = delegator.findList("PortletAndPortalPagePortlet",
> EntityCondition.makeCondition([portalPageId : portalPageId]), null, orderBy,
> null, false);
>
> and I get:
> (Field with name lastUpdatedStamp not found in the
> PortletAndPortalPagePortlet Entity)
>
>
> Browsing the OFBiz code it seems that sorting by this "embedded" fields is
> possible in the forms actions <order-by/> tag.
>
> Could it be possible to have it working in groovy  files also? Does it make
> sense?
>
> Many thanks,
> Bruno
>