Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Not null query translated wrong?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Anders Wåglund  
View profile  
 More options May 8 2012, 10:38 am
From: Anders Wåglund <and...@waglund.se>
Date: Tue, 8 May 2012 07:38:59 -0700 (PDT)
Local: Tues, May 8 2012 10:38 am
Subject: Not null query translated wrong?

Running build 701 I have a dynamic query with:
.Where(x => x.Converted || x.Report != null)

This gets translated to:
(Converted:true OR -Report:[[NULL_VALUE]] AND Report:*)

Which doesn't seem to produce correct results, that is I do not get any
documents where Report is null.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Itamar Syn-Hershko  
View profile  
 More options May 8 2012, 12:03 pm
From: Itamar Syn-Hershko <ita...@hibernatingrhinos.com>
Date: Tue, 8 May 2012 19:03:38 +0300
Local: Tues, May 8 2012 12:03 pm
Subject: Re: [RavenDB] Not null query translated wrong?

Can you please try this with the latest unstable?
On May 8, 2012 5:39 PM, "Anders Wåglund" <and...@waglund.se> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anders Wåglund  
View profile  
 More options May 9 2012, 1:37 am
From: Anders Wåglund <and...@waglund.se>
Date: Tue, 8 May 2012 22:37:05 -0700 (PDT)
Local: Wed, May 9 2012 1:37 am
Subject: Re: [RavenDB] Not null query translated wrong?

It does not work in build 910


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anders Wåglund  
View profile  
 More options May 9 2012, 1:50 am
From: Anders Wåglund <and...@waglund.se>
Date: Tue, 8 May 2012 22:50:23 -0700 (PDT)
Local: Wed, May 9 2012 1:50 am
Subject: Re: [RavenDB] Not null query translated wrong?

Or 926..

I'll try to create a failing test


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anders Wåglund  
View profile  
 More options May 9 2012, 2:46 am
From: Anders Wåglund <and...@waglund.se>
Date: Tue, 8 May 2012 23:46:46 -0700 (PDT)
Local: Wed, May 9 2012 2:46 am
Subject: Re: [RavenDB] Not null query translated wrong?

The following test fails using the latest code from
github.com/ravendb/ravendb

public void Fails()
{
    using (var store = NewDocumentStore())
    {
        using (var s = store.OpenSession())
        {
            s.Store(new Dummy { Boolean = false, Object = null });
            s.Store(new Dummy { Boolean = true, Object = null });
            s.Store(new Dummy { Boolean = false, Object = new Dummy() });
            s.Store(new Dummy { Boolean = true, Object = new Dummy() });
            s.SaveChanges();
        }
        using (var s = store.OpenSession())
        {
            var objects = s.Query<Dummy>()
                .Customize(x => x.WaitForNonStaleResults())
                .Where(x => x.Boolean || x.Object != null)
                .ToArray();

            Assert.Equal(3, objects.Length); // objects.Length is 2
        }
    }

}

public class Dummy
{
    public bool Boolean { get; set; }
    public Dummy Object { get; set; }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Warren  
View profile  
 More options May 9 2012, 4:44 am
From: Matt Warren <mattd...@gmail.com>
Date: Wed, 9 May 2012 01:44:48 -0700 (PDT)
Local: Wed, May 9 2012 4:44 am
Subject: Re: [RavenDB] Not null query translated wrong?

The problems is that the generated query doesn't have the brackets in the
right place, if you put code below into your test it works as expected:

        var test = s.Advanced.LuceneQuery<Dummy>("Temp/Dummies/ByBooleanAndObject")
                .Where("Boolean:true OR (-Object:[[NULL_VALUE]] AND Object:*)")
                .ToList();

        Assert.Equal(3, test.Count);

Note the brackets around the ".. AND .." statement to change the precedence. I think this is a bug in RavenDB as it's not generating the right query


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options May 9 2012, 6:51 am
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Wed, 9 May 2012 13:51:30 +0300
Local: Wed, May 9 2012 6:51 am
Subject: Re: [RavenDB] Not null query translated wrong?

Yep, fixed now, will be in the next build


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anders Wåglund  
View profile  
 More options May 9 2012, 7:02 am
From: Anders Wåglund <and...@waglund.se>
Date: Wed, 9 May 2012 04:02:59 -0700 (PDT)
Local: Wed, May 9 2012 7:02 am
Subject: Re: [RavenDB] Not null query translated wrong?

Great!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anders Wåglund  
View profile  
 More options May 9 2012, 8:45 am
From: Anders Wåglund <and...@waglund.se>
Date: Wed, 9 May 2012 05:45:59 -0700 (PDT)
Local: Wed, May 9 2012 8:45 am
Subject: Re: [RavenDB] Not null query translated wrong?

Will there be a new stable candidate with this fix, or was it too late?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options May 9 2012, 8:59 am
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Wed, 9 May 2012 15:59:36 +0300
Local: Wed, May 9 2012 8:59 am
Subject: Re: [RavenDB] Not null query translated wrong?

Yeah, we are currently working on stabalizing things, and there will be a
stable soon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »