meta-data problem

Поиск
Список
Период
Сортировка
От Tomi NA
Тема meta-data problem
Дата
Msg-id d487eb8e0603110627h28e634e2tad0233bf45bccb69@mail.gmail.com
обсуждение исходный текст
Ответы Re: meta-data problem
Список pgsql-jdbc
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 relations are discovered, so all the foreign keys are simply interpreted as additional 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 obvious difference.
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.

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 we find out why the relationships aren't found.

TIA,
Tomislav

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: java.sql.SQLException: No suitable driver
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: meta-data problem