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
SelectMany throws NotSupportedException
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
  2 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
 
Gal Koren  
View profile  
 More options Jun 12 2012, 3:40 pm
From: Gal Koren <koren....@gmail.com>
Date: Tue, 12 Jun 2012 12:40:19 -0700 (PDT)
Local: Tues, Jun 12 2012 3:40 pm
Subject: SelectMany throws NotSupportedException

Hi.

I might be doing something wrong and I wish to know how to make it right.
This piece of code throws NotSupportedException :

                var results = session.Query<Mailbox>().
                    Where(mailBox => mailBox.Name.Equals("Gal")).
                    SelectMany(mailBox => mailBox.Items).Where(item =>
!item.IsDownloaded);

The story: A MailBox has Items (a collection of "Item"), and I want all the
Items in mailbox "Gal" that are not marked as downloaded.
I'd be thankful for hint and even more thankful for a working example :)

Thanks.


 
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 Jun 12 2012, 5:26 pm
From: Itamar Syn-Hershko <ita...@hibernatingrhinos.com>
Date: Wed, 13 Jun 2012 00:26:49 +0300
Local: Tues, Jun 12 2012 5:26 pm
Subject: Re: [RavenDB] SelectMany throws NotSupportedException

SelectMany is not supported on queries by design. If you want to get the
_items_ from the mailbox document you will need to write an index and
project out of it.

You can get the mailbox document itself rather easily by using the Any()
operator within the .Where() on mailBox.Items


 
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 »