delegator storeByCondition queries

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

delegator storeByCondition queries

Vikas Jadhav-2
Hi,

I am using GenericDelegator to to retrieve or store data from the tables.

But I am facing some problems to update some records using delegators.

e.g. I have a table as below.
EMP (empId primary key, name, age, salary, dept foreign key)

Here I want to update the salary of all the employees who belongs to
specific department.
e.g.
UPDATE EMP set salary=salary * 10 where dept='QA';

So, how to put this in ofbiz delegator.
How to set fields to update in query.

Thanks,
Vikas
Reply | Threaded
Open this post in threaded view
|

Re: delegator storeByCondition queries

Ashish Vijaywargiya
http://docs.ofbiz.org/x/UBE

Please read the details provided in the above document.
I am sure you will get your answer.

--
Ashish

On Thu, May 21, 2009 at 11:43 AM, Vikas Jadhav <[hidden email]>wrote:

> Hi,
>
> I am using GenericDelegator to to retrieve or store data from the tables.
>
> But I am facing some problems to update some records using delegators.
>
> e.g. I have a table as below.
> EMP (empId primary key, name, age, salary, dept foreign key)
>
> Here I want to update the salary of all the employees who belongs to
> specific department.
> e.g.
> UPDATE EMP set salary=salary * 10 where dept='QA';
>
> So, how to put this in ofbiz delegator.
> How to set fields to update in query.
>
> Thanks,
> Vikas
>
Reply | Threaded
Open this post in threaded view
|

Re: delegator storeByCondition queries

Ashish Vijaywargiya
One more thing your upcoming question will go to the user mailing list.
For more details please read:
http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists

--
Ashish

On Thu, May 21, 2009 at 11:50 AM, Ashish Vijaywargiya <
[hidden email]> wrote:

> http://docs.ofbiz.org/x/UBE
>
> Please read the details provided in the above document.
> I am sure you will get your answer.
>
> --
> Ashish
>
>
> On Thu, May 21, 2009 at 11:43 AM, Vikas Jadhav <[hidden email]>wrote:
>
>> Hi,
>>
>> I am using GenericDelegator to to retrieve or store data from the tables.
>>
>> But I am facing some problems to update some records using delegators.
>>
>> e.g. I have a table as below.
>> EMP (empId primary key, name, age, salary, dept foreign key)
>>
>> Here I want to update the salary of all the employees who belongs to
>> specific department.
>> e.g.
>> UPDATE EMP set salary=salary * 10 where dept='QA';
>>
>> So, how to put this in ofbiz delegator.
>> How to set fields to update in query.
>>
>> Thanks,
>> Vikas
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: delegator storeByCondition queries

Vivek Mishra-2
In reply to this post by Vikas Jadhav-2
Hello Vikas,

I think "EntityCondition" can help you in this situation. Just search
for this and see how it works.

Thanks.
--
Vivek Mishra



Vikas Jadhav wrote:

> Hi,
>
> I am using GenericDelegator to to retrieve or store data from the tables.
>
> But I am facing some problems to update some records using delegators.
>
> e.g. I have a table as below.
> EMP (empId primary key, name, age, salary, dept foreign key)
>
> Here I want to update the salary of all the employees who belongs to
> specific department.
> e.g.
> UPDATE EMP set salary=salary * 10 where dept='QA';
>
> So, how to put this in ofbiz delegator.
> How to set fields to update in query.
>
> Thanks,
> Vikas
>
>  

smime.p7s (4K) Download Attachment