<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I'm not sure how I feel about any of this. I'll need to think more when I'm not reading the thread on my phone.</div><div><br>On Mar 15, 2013, at 12:44 PM, Summers Pittman <<a href="mailto:supittma@redhat.com">supittma@redhat.com</a>> wrote:<br><br></div><blockquote type="cite"><div>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div class="moz-cite-prefix">On 03/15/2013 01:34 PM, Sebastien Blanc
wrote:<br>
</div>
<blockquote cite="mid:CAD_dpu1arLq3apYOHPA0iB7gMBAzstJS2K5D3K23cx3CFBzVmg@mail.gmail.com" type="cite">I like the idea but I will more see that has a
method/function for the pipelineManager (and will be easier to
implement in JS, I think) :
<div><br>
</div>
<div>var myParentPipe =
Aerogear.Pipeline({name:"parentPipe"}).pipes.parentPipe</div>
<div><br>
</div>
<div>var myChildPipe = Aerogear.Pipeline.fromParent(myParentPipe,
{options} )</div>
</blockquote>
What would it look like to get a child record from a parent?<br>
<blockquote cite="mid:CAD_dpu1arLq3apYOHPA0iB7gMBAzstJS2K5D3K23cx3CFBzVmg@mail.gmail.com" type="cite">
<div> <br>
<br>
<div class="gmail_quote">On Fri, Mar 15, 2013 at 5:37 PM,
Douglas Campos <span dir="ltr"><<a moz-do-not-send="true" href="mailto:qmx@qmx.me" target="_blank">qmx@qmx.me</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">What about
this?<br>
<br>
Pipeline<Post> postPipeline = …<br>
Post post = // get from the pipeline<br>
Pipeline<Comment>
postPipeline.childPipelineForOrOtherWeirdName(Comment.class,
post)<br>
<div>
<div class="h5"><br>
<br>
On 15/03/2013, at 12:26, Summers Pittman <<a moz-do-not-send="true" href="mailto:supittma@redhat.com">supittma@redhat.com</a>>
wrote:<br>
<br>
> On 03/14/2013 04:48 AM, Matthias Wessendorf wrote:<br>
>><br>
>><br>
>> On Thu, Mar 14, 2013 at 9:32 AM, Sebastien
Blanc <<a moz-do-not-send="true" href="mailto:scm.blanc@gmail.com">scm.blanc@gmail.com</a>>
wrote:<br>
>> Hi,<br>
>> While I was playing with scaffolding and tried
to build a simple Blog Application with Aerogear I faced
the current situation :<br>
>> I have a Post object which contains many
Comment objects. Now I want to call my Post pipe to
retrieve the related comments, I have currently 2
options :<br>
>><br>
>> /posts/1 -> assuming comments will be
implicitly retrieved (eager loading)<br>
>> /comments/?postid=1<br>
>><br>
>> But regarding our model the correct form should
be :<br>
>><br>
>> /posts/1/comments<br>
>><br>
>><br>
>> +1<br>
>> that is the ideal way to model URIs for
"nested" resources.<br>
>><br>
>> See [1], extracted from [2]<br>
>><br>
>><br>
>><br>
>> But, AFAIK, with the current API, it is not
possible to define this last pattern (at least for JS
and iOs, confirmed by Matzew). When doing a read we can
pass an id option but as mentioned in the doc, this id
will always be append to the endpoint.<br>
>><br>
>><br>
>> Well, it is possible - but in a very (IMO) ugly
way:<br>
>><br>
>> <a moz-do-not-send="true" href="https://gist.github.com/matzew/6ab432e437b9a017a21d" target="_blank">https://gist.github.com/matzew/6ab432e437b9a017a21d</a><br>
>><br>
>><br>
>><br>
>><br>
>> IMO, we should be able to support this pattern
but for now I'm not really sure how to specify this in
our API, so if you have any ideas feedback this thread
has been made for you !<br>
>><br>
>><br>
>><br>
>> Suggestion: Enhance the read function -
example:<br>
>><br>
>> <a moz-do-not-send="true" href="https://gist.github.com/matzew/04f069dfbed2cc77a8b4" target="_blank">https://gist.github.com/matzew/04f069dfbed2cc77a8b4</a><br>
> I'm thinking of the inverse myself. Add a
"ParentPath" property which can be used to extract
information from parent objects.<br>
><br>
> <a moz-do-not-send="true" href="https://gist.github.com/secondsun/17ce96082eda37dbd10e" target="_blank">https://gist.github.com/secondsun/17ce96082eda37dbd10e</a><br>
><br>
>><br>
>><br>
>> -Matthias<br>
>><br>
>><br>
>> [1] <a moz-do-not-send="true" href="http://www.infoq.com/resource/articles/rest-introduction/en/resources/figure2.jpg" target="_blank">http://www.infoq.com/resource/articles/rest-introduction/en/resources/figure2.jpg</a><br>
>> [2] <a moz-do-not-send="true" href="http://www.infoq.com/articles/rest-introduction" target="_blank">http://www.infoq.com/articles/rest-introduction</a><br>
>><br>
>><br>
>><br>
>><br>
>> Seb<br>
>><br>
>><br>
>> _______________________________________________<br>
>> aerogear-dev mailing list<br>
>> <a moz-do-not-send="true" href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
>> <a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> Matthias Wessendorf<br>
>><br>
>> blog: <a moz-do-not-send="true" href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
>> sessions: <a moz-do-not-send="true" href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
>> twitter: <a moz-do-not-send="true" href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
>><br>
>> _______________________________________________<br>
>> aerogear-dev mailing list<br>
>><br>
>> <a moz-do-not-send="true" href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
>> <a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
><br>
> _______________________________________________<br>
> aerogear-dev mailing list<br>
> <a moz-do-not-send="true" href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> <a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br>
</div>
</div>
-- qmx<br>
<div class="HOEnZb">
<div class="h5"><br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a moz-do-not-send="true" href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
aerogear-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></pre>
</blockquote>
<br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>aerogear-dev mailing list</span><br><span><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></span></div></blockquote></body></html>