Closed blakesmith closed 12 years ago
When doing a put with super columns, you need to explicitly pass the super argument. So in your case:
(hector/put cass/keyspace "Documents" "bob@hotmail.com" {"123" {"sec-0" "bob"}} :type :super)
That being said, you almost certainly shouldn't be using super columns. This quora answer does a good job of explaining why:
http://www.quora.com/Cassandra-database/Why-is-it-bad-to-use-supercolumns-in-Cassandra
Cassandra now has the concept of composite columns that can be used as a replacement for super columns and should generally be used going forward. These links might be helpful:
http://www.datastax.com/dev/blog/schema-in-cassandra-1-1 http://www.datastax.com/dev/blog/introduction-to-composite-columns-part-1
Hey Nick,
Thanks a bunch for the help and advice. I'm still modeling out my domain, so this is extremely helpful - I'll rewrite what I have using regular columns.
In the meantime, I sent a pull request to update the README to reflect the correct syntax for those who might try this later: https://github.com/pingles/clj-hector/pull/27
Thanks again!
Blake
Hello there!
I seem to be having some trouble creating a mutation on a super column family.
First, I create the column family:
Which yields a schema like so:
Then I try to 'put' rows into the column family:
Which throws this exception:
Can anyone shed any insight into this exception? I'm new to Cassandra, so I'm probably missing something obvious, but I wasn't sure if it was something specifically with clj-hector.
Thanks!
Blake