You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Lyuben Todorov (JIRA)" <ji...@apache.org> on 2013/08/14 00:00:49 UTC

[jira] [Updated] (CASSANDRA-5875) Ambiguous error message: "You must specify one and only one PRIMARY KEY"

     [ https://issues.apache.org/jira/browse/CASSANDRA-5875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lyuben Todorov updated CASSANDRA-5875:
--------------------------------------

    Attachment: 5875.patch

Added a check to distinguish between having too many keys and not having one at all.
                
> Ambiguous error message: "You must specify one and only one PRIMARY KEY"
> ------------------------------------------------------------------------
>
>                 Key: CASSANDRA-5875
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5875
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jacob Rhoden
>            Assignee: Lyuben Todorov
>            Priority: Minor
>         Attachments: 5875.patch
>
>
> Minor issue, but might be beneficial for new people. I was _missing_ a primary key but thought it meant there was more than one primary key, and was confused for a minute. Here is the current error: 
> Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: You must specify one and only one PRIMARY KEY
> 	at com.datastax.driver.core.ResultSetFuture.convertException(ResultSetFuture.java:252)
> 	at com.datastax.driver.core.ResultSetFuture$ResponseCallback.onSet(ResultSetFuture.java:119)
> 	at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:202)
> 	at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:319)
> Recommend considering two different error messages, ie:
>  - No primary keys were found, when exactly one is required.
>  - Multiple primary keys were found, when exactly one may be specified.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira