kundera icon indicating copy to clipboard operation
kundera copied to clipboard

Problem with null values

Open sachur opened this issue 14 years ago • 18 comments

I discovered that when I delete records in the database, I still nulls.

Since then the records could retrieve non-null?

Thanks (sorry for my English)

sachur avatar Sep 10 '12 10:09 sachur

Hi, Are you using Cassandra? once a record deleted from cassandra, still it's row key exists. However Kundera filters out such record and those will not be accessible.

Please explain a bit more, if your scenario differ from above mentioned.

-Vivek

mevivs avatar Sep 10 '12 11:09 mevivs

Yes, I'm using Cassandra.

But, I have an global return list, which return all the row of my DB :

String query = "Select p From FileCassandra p ";
Query q = em.createQuery(query);
List<FileCassandra> list = q.getResultList();

After delete, this method return a list where the row I deleted appear to "null".

Any solution?

sachur avatar Sep 10 '12 11:09 sachur

Are you using 2.0.7 release? I guess it is already fixed in current trunk branch.

-Vivek

mevivs avatar Sep 10 '12 11:09 mevivs

Yes, I'm using a 2.0.7

sachur avatar Sep 10 '12 11:09 sachur

Please verify with trunk, i think it should work.

-Vivek

mevivs avatar Sep 10 '12 11:09 mevivs

Yes, I'm using maven, and the version is 2.0.7 SNAPSHOT Kundera.

In BD, the table has 4 entries (2 null), and the method getResultList returns those 4 entries.

sachur avatar Sep 10 '12 13:09 sachur

Trunk is on 2.0.8. Just pull trunk branch and build your code through maven. It should work for you.

On Mon, Sep 10, 2012 at 7:09 PM, sachur [email protected] wrote:

Yes, I'm using maven, and the version is 2.0.7 SNAPSHOT Kundera.

In BD, the table has 4 entries (2 null), and the method getResultList returns those 4 entries.

— Reply to this email directly or view it on GitHubhttps://github.com/impetus-opensource/Kundera/issues/117#issuecomment-8423670.

xamry avatar Sep 10 '12 13:09 xamry

2.0.8? The latest stable version is 2.0.7?

sachur avatar Sep 10 '12 13:09 sachur

Current trunk branch is "2.0.8-SNAPSHOT". to checkout :

git clone git://github.com/impetus-opensource/Kundera.git git checkout trunk

and then build: mvn clean install (to skip test) -DskipTests

mevivs avatar Sep 10 '12 15:09 mevivs

Somehow there another? A method that returns only non-null values​​?

I thought that with version 2.0.7 there was no problem

sachur avatar Sep 10 '12 15:09 sachur

I think the problem may be in the version of CQL. Where can you watch the version?

sachur avatar Sep 10 '12 16:09 sachur

You can set CQL version in kundera itself. by default it is 2.0

mevivs avatar Sep 10 '12 16:09 mevivs

"Somehow there another? A method that returns only non-null values​​?

I thought that with version 2.0.7 there was no problem"

Please provide more description around this.

mevivs avatar Sep 10 '12 16:09 mevivs

The way to set CQL version is:

Map<String, Client> clients = (Map<String, Client>) em.getDelegate(); Client client = clients.get("cassandra_pu"); ((PelopsClient) client).setCqlVersion()..

Hope it helps.

-Vivek

mevivs avatar Sep 10 '12 16:09 mevivs

You can refer to this test case for an example on how to set CQL version before any operation: https://github.com/impetus-opensource/Kundera/blob/trunk/kundera-cassandra/src/test/java/com/impetus/client/persistence/NativeQueryCQLV3Test.java

Regards, Amresh

On Mon, Sep 10, 2012 at 10:12 PM, Vivek Mishra [email protected]:

The way to set CQL version is:

Map clients = (Map) em.getDelegate(); Client client = clients.get("cassandra_pu"); ((PelopsClient) client).setCqlVersion()..

Hope it helps.

-Vivek

— Reply to this email directly or view it on GitHubhttps://github.com/impetus-opensource/Kundera/issues/117#issuecomment-8429303.

xamry avatar Sep 11 '12 11:09 xamry

I think I'll go to 2.0.8 How to do it the easy way?

Thanks for your trouble

sachur avatar Sep 11 '12 13:09 sachur

In order to use 2.0.8, You have to build Kundera from source, as 2.0.8 is not yet released.

You can pull trunk branch from Github, build using maven, and kundera-xxx-2.0.8 jars would be copied into maven repository (usually /.m2/repository on your machine)

For details on how to build from source - visit "Build from Source" section in https://github.com/impetus-opensource/Kundera/wiki/Download-Kundera

HTH, Amresh

On Tue, Sep 11, 2012 at 6:52 PM, sachur [email protected] wrote:

I think I'll go to 2.0.8 How to do it the easy way?

Thanks for your trouble

— Reply to this email directly or view it on GitHubhttps://github.com/impetus-opensource/Kundera/issues/117#issuecomment-8459260.

xamry avatar Sep 11 '12 13:09 xamry

I guess, it is no more an issue. Closing it.

mevivs avatar Jan 24 '13 08:01 mevivs