Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
mevivs opened this Issue · 2 comments

1 participant

@mevivs
Collaborator

Raising it n behalf of issue raised by Neil Martin.

From: Neil Martin [nsmnsm@gmail.comnsmnsm@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);
   System.out.println(nativeQuery.getResultList());

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

@mevivs mevivs was assigned
@mevivs
Collaborator

Fixed in current trunk branch.

-Vivek

@mevivs
Collaborator

Releasing with 2.3

-Vivek

@mevivs mevivs closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.