Return-Path: X-Original-To: apmail-cayenne-dev-archive@www.apache.org Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 45AE410F2F for ; Fri, 12 Jul 2013 06:14:08 +0000 (UTC) Received: (qmail 64863 invoked by uid 500); 12 Jul 2013 06:14:08 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 64724 invoked by uid 500); 12 Jul 2013 06:14:00 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 64716 invoked by uid 99); 12 Jul 2013 06:13:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jul 2013 06:13:57 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 12 Jul 2013 06:13:51 +0000 Received: (qmail 5874 invoked from network); 12 Jul 2013 06:17:55 -0000 Received: from unknown (HELO ?192.168.1.78?) (212.98.191.213) by vorsha.objectstyle.org with SMTP; 12 Jul 2013 06:17:55 -0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: REST framework on to of Cayenne [Was [jira] [Commented] (CAY-1847) Make ConverterFactory extensible and injected via DI] From: Andrus Adamchik In-Reply-To: Date: Fri, 12 Jul 2013 09:13:29 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <93C3900E-227C-4848-A014-78C499079BAB@objectstyle.org> References: <7CF47ED9-5675-40CB-8F78-D50793809AC8@objectstyle.org> To: dev@cayenne.apache.org X-Mailer: Apple Mail (2.1508) X-Virus-Checked: Checked by ClamAV on apache.org On Jul 11, 2013, at 11:16 PM, John Huss 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.=20 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=