-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cql can't map PK right to entity by using kunder2.4 + cassandra1.2.2 !!!!!!! #214
Comments
Hi, -Vivek |
Looking for more description around this, please provide it. -Vivek |
TestEntity test1 = new TestEntity(); entityManager.persist(test1); TestEntity test2 = new TestEntity(); TestEntity test3 = new TestEntity(); String cql = "select * from test where key in (1,2,3)"; Query query = entityManager.createNativeQuery(cql, TestEntity.class); if (list != null) {
|
can you help me check this problem? |
Yes.. i am looking into this. -Vivek |
by the way, not only "in" keyword, the normal cql searching can not do well . |
Hi,
as
It should work. I will have a look and will provide a proper fix for this. -Vivek |
thanks for your idea, |
This can be computed implicitly. With Cassandra 1.2 onwards CQL3 does not return id field as key with CqlRow object, but as a column with a name "key"(Earlier it was not the case).I did post some queries around this on cassandra user community. So if you give column name as "key" it will work. Though name of column attribute annotated with @column annotation is irrelevant as Cassandra does not use this name as a row key name(it is not possible to define a name for row key in cassandra). So such computations are done within Kundera. I will get it done but i don't see a much of value add with this. Hope it clarifies the cause behind this issue. -Vivek |
by the way , create columnfamily test (id int primary key, url text, userid uuid, datetime timestamp, linkcounts int); |
at this time, the pk name should like fellow, i think. is it right? |
yes. i see your point , it should not be an issue after interoperability support b/w cql and thrift.(planned for 2.5) |
thank you very much, |
Releasing with 2.5, please verify. -Vivek |
I used the following cql to search the data, the PK column is not right mapping to entity class.
select * from test1 where key in (1,2,3)
by the way, the table is created not by cassandra-cli not by cql.
It very important to me ,can anyone help me?
The text was updated successfully, but these errors were encountered: