cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: REST framework on to of Cayenne [Was [jira] [Commented] (CAY-1847) Make ConverterFactory extensible and injected via DI]
Date Fri, 12 Jul 2013 06:13:29 GMT

On Jul 11, 2013, at 11:16 PM, John Huss <johnthuss@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
Mime
View raw message