family.CreateRecord(key: key) doesnt check if BytesType is of 0 length #12

razzmatazz opened this Issue May 24, 2011 · 1 comment

2 participants


Take for example this code:

            var family = db.GetColumnFamily<UTF8Type>("report_word_index");

            dynamic record1 = family.CreateRecord("");
            record1.x = 1;

This fails on runtime with "A first chance exception of type 'Apache.Cassandra.InvalidRequestException' occurred in FluentCassandra.dll" exception in Casssandra.cs: public void recv_batch_mutate()

Took me some time to figure out what is wrong (even though it now seems obvious): key is of 0 bytes length.

There should be a better error message and/or exception from fluentcassandra on .CreateRecord() method maybe..

@nberardi nberardi added a commit that referenced this issue Jan 27, 2012
@nberardi nberardi fix for issue #12 relating to check if BytesType is 0 length on creat…
…ion of family record.

Sorry this has taken so long to respond to.

@nberardi nberardi closed this Jan 27, 2012
@nberardi nberardi was assigned Oct 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment