Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 78556 invoked from network); 12 Oct 2010 13:35:34 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Oct 2010 13:35:34 -0000 Received: (qmail 3588 invoked by uid 500); 12 Oct 2010 13:35:34 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 3478 invoked by uid 500); 12 Oct 2010 13:35:32 -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 3469 invoked by uid 99); 12 Oct 2010 13:35:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 13:35:31 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [192.109.42.8] (HELO einhorn.in-berlin.de) (192.109.42.8) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 13:35:23 +0000 X-Envelope-From: yoda@schli.ch Received: from [10.250.128.186] ([195.234.136.12]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id o9CDZ1Jm014273 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 12 Oct 2010 15:35:01 +0200 From: Marc Guenther Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Tue, 12 Oct 2010 15:34:53 +0200 Subject: a query does not see newly inserted objects? To: user@cayenne.apache.org Message-Id: Mime-Version: 1.0 (Apple Message framework v1078) X-Mailer: Apple Mail (2.1078) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Hi, maybe that's a stupid question, but is there a way to make a query aware = of newly inserted objects? I have a DataContext. I insert some object into it (a user), and then, = without committing the context to the DB, I query it for all users. The = newly inserted user does not show up. The query is a normal SelectQuery. I tried playing around with caching = strategies and isRefreshingObjects, but it didn't work. Is this the expected behaviour? Is it even possible to do this? I tried this, because I have a process which does lots of small changes, = and some of the later ones depend on former changes. At the moment I = commit every change into the DB at once, but I wanted to delay that till = everything is finished, and then do it in one big commit. So I tried to setup a parent/child context, and commit only to the = parent in the child. But then I get failures later in the process cause = the earlier changes are not visible to it. Marc