Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 71318 invoked from network); 19 May 2008 19:17:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 May 2008 19:17:14 -0000 Received: (qmail 22804 invoked by uid 500); 19 May 2008 19:17:16 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 22557 invoked by uid 500); 19 May 2008 19:17:15 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 22546 invoked by uid 99); 19 May 2008 19:17:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 May 2008 12:17:15 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.126.179] (HELO moutng.kundenserver.de) (212.227.126.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 May 2008 19:16:28 +0000 Received: from [192.168.37.3] (p5B375473.dip.t-dialin.net [91.55.84.115]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1JyAqg487g-0005Yu; Mon, 19 May 2008 21:16:43 +0200 Subject: SelectQuery and new objects From: Dirk Lattermann To: user@cayenne.apache.org Content-Type: text/plain Date: Mon, 19 May 2008 21:16:42 +0200 Message-Id: <1211224602.16196.13.camel@dinu.dlnetz> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18vck4uNRWHd7pDkaA31O9/DExfzbMXNfguKZk j/sxa1Nkyu/04UrdgJ5CoRHfKmF0uXGFhAkaSlu1+/w7j+Jo7C lGxEZdVdpiN2X4oDBXVxX4RXVG4/G69 X-Virus-Checked: Checked by ClamAV on apache.org Hello list, as small first steps (again) with Cayenne, I created some data objects via DataContext's newObject(MyDataObject.class). Then, without committing, I created an unqualified SelectQuery to fetch all objects of class MyDataObject. Executing it on the DataContext, only objects from the database are included in the returned list. Is this expected? I couldn't find something explicit in the docs. To my understanding, running the query on the DataContext should return all objects known to it, even if they aren't in the database yet. This would be like uncommitted data in a database session, which is visible for queries in this same session. Thank you. Dirk