Return-Path: X-Original-To: apmail-cayenne-commits-archive@www.apache.org Delivered-To: apmail-cayenne-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4599C10ACE for ; Tue, 21 Jan 2014 17:28:36 +0000 (UTC) Received: (qmail 4524 invoked by uid 500); 21 Jan 2014 17:28:30 -0000 Delivered-To: apmail-cayenne-commits-archive@cayenne.apache.org Received: (qmail 4402 invoked by uid 500); 21 Jan 2014 17:28:28 -0000 Mailing-List: contact commits-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 commits@cayenne.apache.org Received: (qmail 4333 invoked by uid 99); 21 Jan 2014 17:28:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jan 2014 17:28:25 +0000 Date: Tue, 21 Jan 2014 17:28:25 +0000 (UTC) From: "Oleg Artyukevich (JIRA)" To: commits@cayenne.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAY-1796) ROP: All entity's to-many relationships getting faulted from database when using it as a parameter in qualifier expression. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAY-1796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Artyukevich updated CAY-1796: ---------------------------------- Attachment: cay1796_v4.patch cay1796test_v2.patch Changes for tests: Now test Expression with parameters with Persistent object as parameter. Changes in patch: ASTList will not create additional copy of array. > ROP: All entity's to-many relationships getting faulted from database when using it as a parameter in qualifier expression. > --------------------------------------------------------------------------------------------------------------------------- > > Key: CAY-1796 > URL: https://issues.apache.org/jira/browse/CAY-1796 > Project: Cayenne > Issue Type: Bug > Components: ROP > Affects Versions: 3.1B2 > Reporter: Dzmitry Kazimirchyk > Fix For: 3.1B3 > > Attachments: cay1796.patch, cay1796_2.patch, cay1796_3.patch, cay1796_v4.patch, cay1796test.patch, cay1796test_v2.patch > > > If entity is used as a parameter in qualifier expression all its unfaulted to-many relationships are faulted prior to actual query sent to server. For example: > Expression exp = ExpressionFactory.matchExp(Painting.ARTIST_PROPERTY, artist); > context.performQuery(new SelectQuery(Painting.class, exp)); > Before actual query will be sent to server all artist's to-many relationships will be faulted. What I see is that in the process of query serialization on client side PersistentObjectList.size() is invoked which triggers relationships' faulting from database. -- This message was sent by Atlassian JIRA (v6.1.5#6160)