You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Sam Hamilton <sa...@sh81.com> on 2011/09/22 09:24:17 UTC
Service to Empty an Entity?
Hi,
Can anyone point me in the direction of an example of a service that would empty the all the data from an entity, I know how to do this in Postgres with 'delete from entity_name_goes_here' but not sure where to start looking for a similar feature in OFBiz?
Thanks
Sam
Re: Service to Empty an Entity?
Posted by Sam Hamilton <sa...@sh81.com>.
Thanks David - will have a hunt around for examples of those.
Cheers
Sam
On 22 Sep 2011, at 15:24, Sam Hamilton wrote:
> Hi,
>
> Can anyone point me in the direction of an example of a service that would empty the all the data from an entity, I know how to do this in Postgres with 'delete from entity_name_goes_here' but not sure where to start looking for a similar feature in OFBiz?
>
>
> Thanks
> Sam
Re: Service to Empty an Entity?
Posted by David E Jones <de...@me.com>.
You can do a delegator.removeByCondition with a null condition (should work, haven't tried it), or the equivalent in simple-method.
There is also a delegator.removeAll(entityName) method… looks like just the dangerous sort of operation you seek.
-David
On Sep 22, 2011, at 12:24 AM, Sam Hamilton wrote:
> Hi,
>
> Can anyone point me in the direction of an example of a service that would empty the all the data from an entity, I know how to do this in Postgres with 'delete from entity_name_goes_here' but not sure where to start looking for a similar feature in OFBiz?
>
>
> Thanks
> Sam