X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id AB6B29DCA15 for ; Sat, 11 Mar 2006 11:22:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82892-02 for ; Sat, 11 Mar 2006 11:22:37 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.204]) by postgresql.org (Postfix) with ESMTP id 7B79A9DCA39 for ; Sat, 11 Mar 2006 11:22:30 -0400 (AST) Received: by uproxy.gmail.com with SMTP id u40so457453ugc for ; Sat, 11 Mar 2006 07:22:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZE5B3UDKG41iKaNsztOutAMQJu/N0iJDfTgWglcEqQf0WJXP26Cahq3h325bzbJsJ96iOar9BZ4tXXV9xpO2c/o/qfYm4O7hQObfGdek4EIPcY6OL/EHuAvJwOvO23m3eMv6pk+2o9ZXGoNjtbgbALFMFqYFmvmoBzsO6T63u54= Received: by 10.66.254.17 with SMTP id b17mr2608119ugi; Sat, 11 Mar 2006 07:22:34 -0800 (PST) Received: by 10.67.30.2 with HTTP; Sat, 11 Mar 2006 07:22:34 -0800 (PST) Message-ID: <224f32340603110722y1aaa0d08w30fdae5c3d33b5d8@mail.gmail.com> Date: Sat, 11 Mar 2006 16:22:34 +0100 From: "Thomas Dudziak" To: "Oliver Jowett" Subject: Re: meta-data problem Cc: "Tomi NA" , pgsql-jdbc@postgresql.org In-Reply-To: <4412E11B.7040407@opencloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4412E11B.7040407@opencloud.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200603/59 X-Sequence-Number: 14840 On 3/11/06, Oliver Jowett wrote: > Tomi NA wrote: > > > My question is: could this be a jdbc-driver bug? I can't tell, but I've > > used another RDBMS with cayenne and database structure discovery worked > > flawlessly there. Could be a cayenne issue, but the developers suggest > > it's probably not, but could be worked arround if needed. > > If you can get some info about exactly what the postgresql driver is > returning that is incorrect or not what cayenne expects, then you might > make some progress.. Otherwise this is a bit vague. Does not seem to be a bug in the JDBC driver. Running DdlUtils' DumpMetadataTask on these tables (the one from the original post with the two other required ones): CREATE TABLE spis ( sif_spis int4 NOT NULL, CONSTRAINT spis_pkey PRIMARY KEY (sif_spis) ); CREATE TABLE vrsta_dokumenta ( sif_vrsta_dokumenta int4 NOT NULL, CONSTRAINT vrsta_dokumenta_pkey PRIMARY KEY (sif_vrsta_dokumenta) ); CREATE TABLE dokument ( sif_dokument int4 NOT NULL, sif_vrsta_dokumenta int4, sif_spis int4, zaprema timestamp, opis varchar(255), CONSTRAINT dokument_pkey PRIMARY KEY (sif_dokument), CONSTRAINT fk_dokument_1 FOREIGN KEY (sif_spis) REFERENCES spis (sif_spis) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT fk_dokument_2 FOREIGN KEY (sif_vrsta_dokumenta) REFERENCES vrsta_dokumenta (sif_vrsta_dokumenta) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) WITHOUT OIDS; produces this XML when using the 8.0-311 JDBC driver against a 8.0 database running on Windows XP:
so the foreign keys are there alright. And AFAIK there is no special JDBC metadata handling necessary for PostgreSQL (as opposed to other databases). cheers, Tom