Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 51573DF71 for ; Sat, 10 Nov 2012 14:37:22 +0000 (UTC) Received: (qmail 33998 invoked by uid 500); 10 Nov 2012 14:37:21 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 33773 invoked by uid 500); 10 Nov 2012 14:37:21 -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 33754 invoked by uid 99); 10 Nov 2012 14:37:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Nov 2012 14:37:20 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mkienenb@gmail.com designates 209.85.214.43 as permitted sender) Received: from [209.85.214.43] (HELO mail-bk0-f43.google.com) (209.85.214.43) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Nov 2012 14:37:15 +0000 Received: by mail-bk0-f43.google.com with SMTP id w5so2214436bku.16 for ; Sat, 10 Nov 2012 06:36:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=bGkUhquaxzrZt7+ogmQ7AnIlzHDT5UDhkQFw3q01wMw=; b=suYM8M6PTr18Niuto2/7adaPrIJ3+eAaNvdIMfn7DumvFXDdKOV4SnYsJi8qkP4c20 HIBuSVV8uS+/yusQlvRRb9kprx0A3b/kWZLMFz6aYv4MA8VIF4L+FczMSMQRjB5nXYsp 5bHYvKc12elkBwreooyWWHAq4AnxiYJ7CCJ4WiJj65Jy0/ipIdbM/mg9X4OKKMTjEnpq ETn80TgVgVeaJwUn5JAoRjXuIrjMqgSxYchcjsTgm5/y7MJufQFQ28S5/vX4ANxecvew xrqoBcfUK3rk3781QK6JdMecs6PtTUbxU56Epi7jxs7uX10Kh/eityAtq8VkApdQ+5/z QV5A== Received: by 10.204.150.218 with SMTP id z26mr209908bkv.95.1352558214162; Sat, 10 Nov 2012 06:36:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.29.23 with HTTP; Sat, 10 Nov 2012 06:36:34 -0800 (PST) In-Reply-To: <1352556723.25783.YahooMailNeo@web122302.mail.ne1.yahoo.com> References: <1352502260.75442.YahooMailNeo@web122304.mail.ne1.yahoo.com> <1352556723.25783.YahooMailNeo@web122302.mail.ne1.yahoo.com> From: Mike Kienenberger Date: Sat, 10 Nov 2012 09:36:34 -0500 Message-ID: Subject: Re: createIfNoSchemaStrategy To: user@cayenne.apache.org, emeka okafor Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I haven't used H2 without schemas. Normally I work using this: jdbc:h2:~/database.file;SCHEMA_SEARCH_PATH=3Dschema1,schema2,schema3,etc On Sat, Nov 10, 2012 at 9:12 AM, emeka okafor wrote: > Hello again, > > thank you for the help. I settled with h2database to begin with and now I= am getting this error when I try to run cayenne: > > Schema "TEST" not found; SQL statement: create blablabla.... > > > even though I have set the following: > > schema-update-strategy=3D"org.apache.cayenne.access.dbsync.CreateIfNoSche= maStrategy" > > > Any idea? > > ________________________________ > From: Michael Gentry > To: user@cayenne.apache.org; emeka okafor > Sent: Saturday, November 10, 2012 2:26 PM > Subject: Re: testing with cayenne > > Hi Emeka, > > We've used http://h2database.com/ before to create a real in-memory > database to run tests against. H2 is small and fast and works pretty > well, plus by creating your schema/data in-memory only, you don't have > to worry about file permissions or cleanup when your tests are done > running. > > mrg > > > On Fri, Nov 9, 2012 at 6:04 PM, emeka okafor wrote= : >> New cayenne user here. I am trying to use cayenne as the orm for an appl= ication and I was wondering how you guys write your unit test? do you test = with a real database or do you have predefined mock objectcontext and son o= n to be able to write performant test? >> Thank you.