UPDATE table SET field = field+1

Posts   
 
    
derrick
User
Posts: 40
Joined: 14-Jan-2004
# Posted on: 23-Nov-2005 16:51:43   

Any idea how to accomplish this via the generated code? I am using the Adapter method.

derrick
User
Posts: 40
Joined: 14-Jan-2004
# Posted on: 24-Nov-2005 00:55:27   

To clarify, what I DON'T want to do is fetch an entity, increment one of its properties and then save it. That solution would have concurrency issues when 2 threads attempt to do this at the same time. (I suspect)

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 24-Nov-2005 04:34:31   

Derrik,

Your answer is available in the LLBLGen User documentation. Take a look at the last section, Expressions in entity updates, in the Generated code - Field expressions and aggregates page.