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
Query Objects + Child Collections
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
  4 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
 
Paul Hinett  
View profile  
 More options Nov 4 2011, 8:31 am
From: "Paul Hinett" <p...@ukcreativedesigns.com>
Date: Fri, 4 Nov 2011 12:31:04 -0000
Local: Fri, Nov 4 2011 8:31 am
Subject: Query Objects + Child Collections

Hi,

I am starting to get a grip of using Query Objects in my project, however I
am unsure of how to return a list of child collections into my view model.

I want to return a list of 'Audio' entities flattened into a list of
'AudioViewModel' objects.however I also need a list of 'Tracks' associated
with each Audio into a 'TrackViewModel' collection.

How would I do this?

Thank You,

Paul


 
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.
Chris Richards  
View profile  
 More options Nov 4 2011, 9:12 pm
From: Chris Richards <chris.richa...@yellowfeather.co.uk>
Date: Fri, 4 Nov 2011 18:12:19 -0700 (PDT)
Local: Fri, Nov 4 2011 9:12 pm
Subject: Re: Query Objects + Child Collections

Isn't this the same problem as you asked before reqarding Questions and
Answers? Just replace Question with Audio, and Answer with Track.
See https://gist.github.com/1298222 for the QueryOver example.

Chris


 
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.
Paul Hinett  
View profile  
 More options Nov 7 2011, 7:16 am
From: "Paul Hinett" <p...@ukcreativedesigns.com>
Date: Mon, 7 Nov 2011 12:16:23 -0000
Local: Mon, Nov 7 2011 7:16 am
Subject: RE: [sharp-architecture] Re: Query Objects + Child Collections

Well not exactly no, last time I was returning  a single question which had
multiple answers so it was fairly simple to do 2 queries and join the
answers after.

This time I have multiple Questions with multiple Answers.answers this time
is a many-to-many.

It may be something obvious that I am over thinking, just need a shove in
the right direction.

Thank You.

From: sharp-architecture@googlegroups.com
[mailto:sharp-architecture@googlegroups.com] On Behalf Of Chris Richards
Sent: 05 November 2011 01:12
To: sharp-architecture@googlegroups.com
Subject: [sharp-architecture] Re: Query Objects + Child Collections

Isn't this the same problem as you asked before reqarding Questions and
Answers? Just replace Question with Audio, and Answer with Track.

See https://gist.github.com/1298222 for the QueryOver example.

Chris

--
You received this message because you are subscribed to the Google Groups
"S#arp Architecture" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sharp-architecture/-/Fpkh2NFjzBAJ.
To post to this group, send email to sharp-architecture@googlegroups.com.
To unsubscribe from this group, send email to
sharp-architecture+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sharp-architecture?hl=en.


 
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.
Chris Richards  
View profile  
 More options Nov 7 2011, 7:58 am
From: Chris Richards <chris.richa...@yellowfeather.co.uk>
Date: Mon, 07 Nov 2011 12:58:02 +0000
Local: Mon, Nov 7 2011 7:58 am
Subject: Re: [sharp-architecture] Re: Query Objects + Child Collections

The gist example will return a list of QuestionViewModels.
BTW - I've just updated the gist to fix some syntax errors and add a
return value.

Chris


 
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 »