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 26F299DCA75 for ; Sat, 11 Mar 2006 10:27:23 -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 69792-06 for ; Sat, 11 Mar 2006 10:27:26 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by postgresql.org (Postfix) with ESMTP id D79C39DCB7A for ; Sat, 11 Mar 2006 10:27:20 -0400 (AST) Received: by wproxy.gmail.com with SMTP id 57so323391wri for ; Sat, 11 Mar 2006 06:27:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=nExpW6d6CyEXhrQ0B7nksCN8ewQ6K7kPpIUcCBKr+zhrg1oct4718HCF/dRnaqTU8fLNO0TCX3z2dP2PP+wuJrWrmQiVy/PXBH43kxQ3fVSBrNih4M4KkGHHsvAm10XvolL8B9v4yrIblbZeg0JVcbN0kzk4Q8mgwgnimeXbDbE= Received: by 10.54.142.13 with SMTP id p13mr322729wrd; Sat, 11 Mar 2006 06:27:25 -0800 (PST) Received: by 10.54.93.4 with HTTP; Sat, 11 Mar 2006 06:27:25 -0800 (PST) Message-ID: Date: Sat, 11 Mar 2006 15:27:25 +0100 From: "Tomi NA" To: pgsql-jdbc@postgresql.org Subject: meta-data problem MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20059_12889215.1142087245281" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.951 required=5 tests=[AWL=0.005, HTML_10_20=0.945, HTML_MESSAGE=0.001] X-Spam-Score: 0.951 X-Spam-Level: X-Archive-Number: 200603/56 X-Sequence-Number: 14837 ------=_Part_20059_12889215.1142087245281 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi everyone, I use cayenne as on object relational mapping system and have a question about using it with pgsql. It seems that when I try to reverse engineer a pgsql db (server v.8.1.2), the table structure is OK, but no table relation= s are discovered, so all the foreign keys are simply interpreted as additiona= l integer columns, instead of foreign keys. I've tried using the driver supplied with pgsql 8.1.2 (8.0-310?) and 8.2dev-501, but it makes no obviou= s difference. My question is: could this be a jdbc-driver bug? I can't tell, but I've use= d 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. I don't think there's anything wrong with the table and references definitions. To illustrate, here's one: CREATE TABLE opca.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 opca.spis (sif_spis) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT fk_dokument_2 FOREIGN KEY (sif_vrsta_dokumenta) REFERENCES opca.vrsta_dokumenta (sif_vrsta_dokumenta) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) WITHOUT OIDS; Btw, I don't use any composite keys in this database whatsoever, so that's not part of the problem (I've seen it mentioned in o post some time ago). I'll reconstruct the relationships by hand this time, but it'd be nice if w= e find out why the relationships aren't found. TIA, Tomislav ------=_Part_20059_12889215.1142087245281 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi everyone,

I use cayenne as on object relational mapping system an= d have a question about using it with pgsql. It seems that when I try to re= verse engineer a pgsql db (server v.8.1.2), the table structure is OK, but = no table relations are discovered, so all the foreign keys are simply inter= preted as additional integer columns, instead of foreign keys. I've tried u= sing the driver supplied with pgsql=20 8.1.2 (8.0-310?) and 8.2dev-501, but it makes no obvious difference.
My = question is: could this be a jdbc-driver bug? I can't tell, but I've used a= nother RDBMS with cayenne and database structure discovery worked flawlessl= y there. Could be a cayenne issue, but the developers suggest it's probably= not, but could be worked arround if needed.

I don't think there's anything wrong with the table and references = definitions. To illustrate, here's one:
CREATE TABLE opca.dokument
(<= br>  sif_dokument int4 NOT NULL,
  sif_vrsta_dokumenta int4,  sif_spis int4,
  zaprema timestamp,
  opis varchar(255),
  CONSTR= AINT dokument_pkey PRIMARY KEY (sif_dokument),
  CONSTRAINT fk_doku= ment_1 FOREIGN KEY (sif_spis)
      REFERENCES = opca.spis (sif_spis) MATCH SIMPLE
      ON UPDA= TE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT fk_dokument_2 FOREIGN KEY (sif_vrsta_dokumenta)
&n= bsp;     REFERENCES opca.vrsta_dokumenta (sif_vrsta_dok= umenta) MATCH SIMPLE
      ON UPDATE NO ACTION = ON DELETE NO ACTION
)
WITHOUT OIDS;

Btw, I don't use any comp= osite keys in this database whatsoever, so that's not part of the problem (= I've seen it mentioned in o post some time ago).
I'll reconstruct the relationships by hand this time, but it'd be nice = if we find out why the relationships aren't found.

TIA,
Tomislav<= br> ------=_Part_20059_12889215.1142087245281--