On Jul 11, 2013, at 11:16 PM, John Huss <johnth...@gmail.com> wrote:

> The trickiest thing we found to deal with was avoiding infinite loops in
> serialization due to reverse relationships.  If your model allows you to
> choose one side of the relationship in every case then you can avoid it,
> but if you need it to be dynamic it becomes more painful.

In my implementation I don't serialize based on the DataMap alone. There has to 
be a path tree describing the result associated with a given request (either 
inferred from request parameters, or created server-side for a given REST 
method). It solves this problem completely by providing constraints on the 
subgraph returned to the caller. 

FWIW this is not unlike serialization Cayenne is doing for ROP, that is also 
explicitly bound by a similar tree inferred from the query prefetches.

Andrus

Reply via email to