New bug in C# driver 2.5 for partition keys

Description

There is a new bug related to partition keys in the C# driver 2.5 effecting partition keys when using POCOs decorated with attributes for creating column families in Cassandra. This is a regression as the bug did not exist in C# driver version 2.1.5.

When attempting to create the table via the CreateIfNotExists method of the session object, the following error is thrown: "No partition key is defined."

Code is as follows:

Program.cs:

TestObject.cs:

Please let me know if you need additional information or documentation.

Environment

Using Cassandra 2.1.2 on a Windows 8.1 update development laptop.

Activity

Show:
Jorge Bay Gondra
February 10, 2015, 7:20 PM

It looks like you are using a mix of new mappings and the legacy GetTable<T>() extension method.

If you are using the new mapping attributes, you should use the new way to get a Table<T> instance, use Table constructor instead as specified in the upgrade guide and Linq doc.

In your example, replace the table instance create with:

Not a Problem

Assignee

Unassigned

Reporter

Thomas Atwood

Labels

None

Reproduced in

None

PM Priority

None

Fix versions

None

External issue ID

None

Doc Impact

None

Reviewer

None

Pull Request

None

Epic Link

None

Sprint

None

Pull Requests

None

Size

None

Components

Affects versions

Priority

Blocker