Greeting DenesL,

I appreciate you taking the time to respond.

On Sunday, January 13, 2013 9:34:43 AM UTC-6, DenesL wrote:
>
> Hi pin,
>
> to the person, pet and toy tables add:
> format='%(name)s'
>
>
Thanks for the suggestion, I generally do this in my other apps, just did 
not include it in the quick example above.
 

> > However I need to be able to perform a call that allows me to pass in 
> the person's id and provides the info for all the pets owned by that person.
>
> '/pets/{ownership.personid}'
>
>
This returns results from the ownership table which just show me the pet 
name.  What I was instead looking for is it to return the associated 
results from the pets table so all the fields for the pets would be shown.

I thought I would just be able to do something like 
'/owners/{ownership.personid}/pets[pet.id]' however that does not return 
the correct results.  It does return results oddly enough, however from the 
results it returns it appears as though it takes ownership.id and uses that 
to join pet.id instead of using ownership.petid which references the pet 
table.  

 

> > Also taking it a step further I want to be able to provide a list of toy 
> names for all the toys owned by pets owned by a particular person again by 
> making one call in that passes the id of the person.
>
> It should be:
> *'*/pets/{ownership.personid}/toys[toy.owner]'
>
> but it does not work correctly.
> I believe I have the fix, I will discuss it with Massimo.
>
> Denes
>

Yeah, I had tried things like that but do not get the expected records back 
which is why I figured I was doing something wrong.  

Thanks for digging into this problem.  

-- 



Reply via email to