Jason-
I was looking at something similar today, but my approach is slightly
different. What I would prefer to do is replace all UUIDs with paths, both
for input and output.

So if /content/regions/region1 has a multi-valued Reference property called
users, you'd get something like this:
{
  'users' : [ '/content/users/user1', '/content/users/user2' ]
}

WDYT?

Justin

On Wed, Jan 27, 2010 at 5:19 PM, Jason Rose <[email protected]> wrote:

> Hello all,
>
> Following up on the JIRA case that Felix quickly addressed and the
> discussion that came out of it, it appears that sling will be very useful in
> my current project.   I'm planning on using sling as my backend with
> sproutcore as the rich client front end.  It seems the cleanest way from a
> REST perspective is to allow dereferencing properties in URLs so that the
> client can follow relationships.
>
> In my previous posts, I was using an example of a many-to-many relationship
> between users and regions.  I'll try to stick to that convention in these
> posts as well.
>
> For example, if I wanted to see all the regions that all the users assigned
> to a specific region are assigned to, I think that path would look like
> this, omitting the URL prefix: "/regions/<uuid>/users/regions.json"
>
> I'm interested in what the devs think about this sort of usage of sling,
> what sort of suggestions they have, and where in the code I should look to
> implement these changes.
>
> -Jason
>

Reply via email to