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 BCF7B775A for ; Fri, 23 Dec 2011 08:50:04 +0000 (UTC) Received: (qmail 4893 invoked by uid 500); 23 Dec 2011 08:50:04 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 4808 invoked by uid 500); 23 Dec 2011 08:50:04 -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 4800 invoked by uid 99); 23 Dec 2011 08:50:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Dec 2011 08:50:03 +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 [82.135.106.35] (HELO mail.donat-group.de) (82.135.106.35) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 23 Dec 2011 08:49:57 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.donat-group.de (Postfix) with ESMTP id 6D8A011E2A3 for ; Fri, 23 Dec 2011 09:49:35 +0100 (CET) Received: from mail.donat-group.de ([127.0.0.1]) by localhost (mailserver.donat-group.DMZ [127.0.0.1]) (amavisd-new, port 10024) with SMTP id nCJCotSk2tKe for ; Fri, 23 Dec 2011 09:49:35 +0100 (CET) Received: from SPEX01.softplant.de (unknown [192.168.101.5]) by mail.donat-group.de (Postfix) with ESMTP id 530A611E2A1 for ; Fri, 23 Dec 2011 09:49:35 +0100 (CET) Received: from SPEX01.softplant.de ([fe80::6553:84e2:bece:7b06]) by spex01.softplant.de ([fe80::6553:84e2:bece:7b06%14]) with mapi id 14.01.0355.002; Fri, 23 Dec 2011 09:49:35 +0100 From: =?iso-8859-1?Q?Sch=F6nfisch=2C_J=F6rg?= To: "dev@cayenne.apache.org" Subject: AW: ThrowOnPartialOrCreateSchemaStrategy, DbEntities with schema, and missing tables Thread-Topic: ThrowOnPartialOrCreateSchemaStrategy, DbEntities with schema, and missing tables Thread-Index: AczBT0NUaawcqN8qTTagP9utQ1YCxwAAGwoA Date: Fri, 23 Dec 2011 08:49:34 +0000 Message-ID: <3BD3774E5685E142AF9CA634D421DEFF09624CAD@spex01.softplant.de> References: <3BD3774E5685E142AF9CA634D421DEFF09624C97@spex01.softplant.de> In-Reply-To: <3BD3774E5685E142AF9CA634D421DEFF09624C97@spex01.softplant.de> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.20.177] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 CAY-1226 might also be related to this. -----Urspr=FCngliche Nachricht----- Von: Sch=F6nfisch, J=F6rg [mailto:joerg.schoenfisch@softplant.de]=20 Gesendet: Freitag, 23. Dezember 2011 09:46 An: dev@cayenne.apache.org Betreff: ThrowOnPartialOrCreateSchemaStrategy, DbEntities with schema, and = missing tables Hi everybody, I'm using a ThrowOnPartialOrCreateSchemaStrategy and I ran into the problem= that my tables are not generated if I specify a schema for the DbEntities.= SchemaAnalyzer.compareTables only checks if the schema exists and doesn't = verify if it actually contains any tables. I'm using the latest trunk (rev = 1222604) and Postgres 8.3. The following patch fixes the problem for me. Sh= ould I raise an issue in JIRA for this? Cheers, Joerg Index: SchemaAnalyzer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- SchemaAnalyzer.java (revision 1222604) +++ SchemaAnalyzer.java (working copy) @@ -119,7 +119,12 @@ =20 if (schema !=3D null) { if (schemaNameMap.get(schema) !=3D null) { - + Collection names =3D schemaNameMap.get(schema)= ; + if (names.contains(name)) { + mapTableInDB.put(name, schema); + } else { + tableNoInDB.add(name); + } } else { isIncluded =3D false;