Update Table with selected columns

View: New views
5 Messages — Rating Filter:   Alert me  

Update Table with selected columns

by Vinaya Tirikkovalluru :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

 

I am using Ibator to generate the Ibatis objects.

I have a requirement where I should be able to create the SQL as

 

Update table set a=1, b=2, c=3, …. Where clause/primary key

 

Any one did get this to work with Ibator? I would like to modify the Ibator code if necessary

 

Thanks

Vinaya

 


This electronic message is intended only for the use of the individual(s) or entity(ies) named above and may contain information which is privileged and/or confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution, dissemination or use of the contents of this message is prohibited. If you received this message in error, please notify the sender immediately.


Re: Update Table with selected columns

by Jeff Butler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ibator generates updateByPrimaryKey and updateByExample methods that
serve this purpose.

Jeff Butler


On Thu, Oct 22, 2009 at 2:26 PM, Vinaya Tirikkovalluru
<vinaya.tirikkovalluru@...> wrote:

> Hi,
>
>
>
> I am using Ibator to generate the Ibatis objects.
>
> I have a requirement where I should be able to create the SQL as
>
>
>
> Update table set a=1, b=2, c=3, …. Where clause/primary key
>
>
>
> Any one did get this to work with Ibator? I would like to modify the Ibator
> code if necessary
>
>
>
> Thanks
>
> Vinaya
>
>
>
> ________________________________
> This electronic message is intended only for the use of the individual(s) or
> entity(ies) named above and may contain information which is privileged
> and/or confidential. If you are not the intended recipient, be aware that
> any disclosure, copying, distribution, dissemination or use of the contents
> of this message is prohibited. If you received this message in error, please
> notify the sender immediately.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...


RE: Update Table with selected columns

by Vinaya Tirikkovalluru :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

They do, they don't take the specified columns though.
I need to update all the columns in the table.
I don't want to do that. I would like to specify which columns I want to
update, not all

Thanks
Vinaya




-----Original Message-----
From: Jeff Butler [mailto:jeffgbutler@...]
Sent: Thursday, October 22, 2009 3:29 PM
To: user-java@...
Subject: Re: Update Table with selected columns

Ibator generates updateByPrimaryKey and updateByExample methods that
serve this purpose.

Jeff Butler


On Thu, Oct 22, 2009 at 2:26 PM, Vinaya Tirikkovalluru
<vinaya.tirikkovalluru@...> wrote:

> Hi,
>
>
>
> I am using Ibator to generate the Ibatis objects.
>
> I have a requirement where I should be able to create the SQL as
>
>
>
> Update table set a=1, b=2, c=3, .... Where clause/primary key
>
>
>
> Any one did get this to work with Ibator? I would like to modify the
Ibator

> code if necessary
>
>
>
> Thanks
>
> Vinaya
>
>
>
> ________________________________
> This electronic message is intended only for the use of the
individual(s) or
> entity(ies) named above and may contain information which is
privileged
> and/or confidential. If you are not the intended recipient, be aware
that
> any disclosure, copying, distribution, dissemination or use of the
contents
> of this message is prohibited. If you received this message in error,
please
> notify the sender immediately.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...



This electronic message is intended only for the use of the individual(s) or entity(ies) named above and may contain information which is privileged and/or confidential.  If you are not the intended recipient, be aware that any disclosure, copying, distribution, dissemination or use of the contents of this message is prohibited.  If you received this message in error, please notify the sender immediately.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...


Re: Update Table with selected columns

by Jeff Butler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

updateByPrimaryKeySelective and updateByExampleSelective allow you to
select the columns - only non-null columns in the parameter objects
will be updated.

Jeff Butler


On Thu, Oct 22, 2009 at 2:31 PM, Vinaya Tirikkovalluru
<vinaya.tirikkovalluru@...> wrote:

> They do, they don't take the specified columns though.
> I need to update all the columns in the table.
> I don't want to do that. I would like to specify which columns I want to
> update, not all
>
> Thanks
> Vinaya
>
>
>
>
> -----Original Message-----
> From: Jeff Butler [mailto:jeffgbutler@...]
> Sent: Thursday, October 22, 2009 3:29 PM
> To: user-java@...
> Subject: Re: Update Table with selected columns
>
> Ibator generates updateByPrimaryKey and updateByExample methods that
> serve this purpose.
>
> Jeff Butler
>
>
> On Thu, Oct 22, 2009 at 2:26 PM, Vinaya Tirikkovalluru
> <vinaya.tirikkovalluru@...> wrote:
>> Hi,
>>
>>
>>
>> I am using Ibator to generate the Ibatis objects.
>>
>> I have a requirement where I should be able to create the SQL as
>>
>>
>>
>> Update table set a=1, b=2, c=3, .... Where clause/primary key
>>
>>
>>
>> Any one did get this to work with Ibator? I would like to modify the
> Ibator
>> code if necessary
>>
>>
>>
>> Thanks
>>
>> Vinaya
>>
>>
>>
>> ________________________________
>> This electronic message is intended only for the use of the
> individual(s) or
>> entity(ies) named above and may contain information which is
> privileged
>> and/or confidential. If you are not the intended recipient, be aware
> that
>> any disclosure, copying, distribution, dissemination or use of the
> contents
>> of this message is prohibited. If you received this message in error,
> please
>> notify the sender immediately.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@...
> For additional commands, e-mail: user-java-help@...
>
>
>
> This electronic message is intended only for the use of the individual(s) or entity(ies) named above and may contain information which is privileged and/or confidential.  If you are not the intended recipient, be aware that any disclosure, copying, distribution, dissemination or use of the contents of this message is prohibited.  If you received this message in error, please notify the sender immediately.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@...
> For additional commands, e-mail: user-java-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...


RE: Update Table with selected columns

by Vinaya Tirikkovalluru :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have update the null columns too with updateByPrimaryKeySelective.

Thanks
Vinaya


-----Original Message-----
From: Jeff Butler [mailto:jeffgbutler@...]
Sent: Thursday, October 22, 2009 3:35 PM
To: user-java@...
Subject: Re: Update Table with selected columns

updateByPrimaryKeySelective and updateByExampleSelective allow you to
select the columns - only non-null columns in the parameter objects
will be updated.

Jeff Butler


On Thu, Oct 22, 2009 at 2:31 PM, Vinaya Tirikkovalluru
<vinaya.tirikkovalluru@...> wrote:

> They do, they don't take the specified columns though.
> I need to update all the columns in the table.
> I don't want to do that. I would like to specify which columns I want to
> update, not all
>
> Thanks
> Vinaya
>
>
>
>
> -----Original Message-----
> From: Jeff Butler [mailto:jeffgbutler@...]
> Sent: Thursday, October 22, 2009 3:29 PM
> To: user-java@...
> Subject: Re: Update Table with selected columns
>
> Ibator generates updateByPrimaryKey and updateByExample methods that
> serve this purpose.
>
> Jeff Butler
>
>
> On Thu, Oct 22, 2009 at 2:26 PM, Vinaya Tirikkovalluru
> <vinaya.tirikkovalluru@...> wrote:
>> Hi,
>>
>>
>>
>> I am using Ibator to generate the Ibatis objects.
>>
>> I have a requirement where I should be able to create the SQL as
>>
>>
>>
>> Update table set a=1, b=2, c=3, .... Where clause/primary key
>>
>>
>>
>> Any one did get this to work with Ibator? I would like to modify the
> Ibator
>> code if necessary
>>
>>
>>
>> Thanks
>>
>> Vinaya
>>
>>
>>
>> ________________________________
>> This electronic message is intended only for the use of the
> individual(s) or
>> entity(ies) named above and may contain information which is
> privileged
>> and/or confidential. If you are not the intended recipient, be aware
> that
>> any disclosure, copying, distribution, dissemination or use of the
> contents
>> of this message is prohibited. If you received this message in error,
> please
>> notify the sender immediately.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@...
> For additional commands, e-mail: user-java-help@...
>
>
>
> This electronic message is intended only for the use of the individual(s) or entity(ies) named above and may contain information which is privileged and/or confidential.  If you are not the intended recipient, be aware that any disclosure, copying, distribution, dissemination or use of the contents of this message is prohibited.  If you received this message in error, please notify the sender immediately.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@...
> For additional commands, e-mail: user-java-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...



This electronic message is intended only for the use of the individual(s) or entity(ies) named above and may contain information which is privileged and/or confidential.  If you are not the intended recipient, be aware that any disclosure, copying, distribution, dissemination or use of the contents of this message is prohibited.  If you received this message in error, please notify the sender immediately.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...