CQL queries does not work with data types other than String #127

mevivs opened this Issue Oct 7, 2012 · 2 comments


None yet
1 participant

mevivs commented Oct 7, 2012

Raising it n behalf of issue raised by Neil Martin.

From: Neil Martin [nsmnsm@gmail.commailto:nsmnsm@gmail.com]
Sent: 06 October 2012 22:42
To: Vivek Mishra
Subject: Re: {kundera-discuss} persistence.xml problem

I do have a question:

I tried deleting a row from cassandra and noticed that CQL didn't see the row anymore, but CLI and a JPA query still sees the key for the row. So I was wondering how a native query from Kundera would see the row. I did the following:

   Query nativeQuery = em.createNativeQuery("SELECT * from car", Car.class);

I get the following exception:

Exception in thread "main" javax.persistence.PersistenceException: com.impetus.kundera.property.PropertyAccessException: java.lang.IllegalArgumentException: Can not set int field com.vnp.cassandra.Car.idhttp://com.vnp.cassandra.Car.idhttp://com.vnp.cassandra.Car.id to java.lang.String
at com.impetus.client.cassandra.CassandraClientBase.executeQuery(CassandraClientBase.java:653)
at com.impetus.client.cassandra.pelops.PelopsClient.executeQuery(PelopsClient.java:529)
at com.impetus.client.cassandra.query.CassQuery.populateEntities(CassQuery.java:102)
at com.impetus.kundera.query.QueryImpl.getResultList(QueryImpl.java:148)
at com.vnp.cassandra.Runner.main(Runner.java:49)

Any idea what's going on there? i was hoping that the native query would ignore the deleted row in the same way that CQL does.

-- Neil

@ghost ghost assigned mevivs Oct 7, 2012


mevivs commented Oct 7, 2012

Fixed in current trunk branch.



mevivs commented Jan 23, 2013

Releasing with 2.3


@mevivs mevivs closed this Jan 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment