What is the CF schema ?

>  Is it not possible to include a column in both the set clause and in the 
> where clause? And if it is not possible, how come?

Not sure. 

Looks like you are looking for a conditional update here. You know the row is 
at ID 1 and you only want to update if locked = 'false' ?

Not sure that's supported. But I'm not sure this is the right sort of error. 

Cheers


-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 6/10/2012, at 11:30 AM, John Sanda <john.sa...@gmail.com> wrote:

> I am using CQL 3 and trying to execute the following,
> 
> UPDATE CHANGELOGLOCK SET LOCKED = 'true', LOCKEDBY = '10.11.8.242 
> (10.11.8.242)', LOCKGRANTED = '2012-10-05 16:58:01' WHERE ID = 1 AND LOCKED = 
> 'false';
> 
> 
> It gives me the error, Bad Request: PRIMARY KEY part locked found in SET 
> part. The primary key consists only of the ID column, but I do have a 
> secondary index on the locked column. Is it not possible to include a column 
> in both the set clause and in the where clause? And if it is not possible, 
> how come?
> 
> Thanks
> 
> - John

Reply via email to