0 Replies Latest reply on Jan 26, 2004 10:39 AM by graste

    HowTo map CMP/CMR with PostGreSQL and unknown PK?

    graste Newbie

      Hi,

      I'm struggling for many days now and I'm wondering how to get this whole thing working. I'm using JBoss 3.2.3 and PostgreSQL 7.3.4.

      I want to map the following two tables:

      CREATE Table kv (
       pkey serial not null,
       kvid int2 not null,
       nummer integer not null,
       passwort varchar(63),
       patientanzahl int2,
       pzf int2,
       daz int2,
       CONSTRAINT id_kv UNIQUE (kvid),
       CONSTRAINT pk_kv PRIMARY KEY(pkey)
      );
      
      
      CREATE Table teilnehmer (
       pkey serial not null,
       teilnehmer_id integer not null,
       fk_kv int4,
       firma varchar(255),
       nachname varchar(255),
       vorname varchar(255),
       titel varchar(63),
       anrede int2 ,
       strasse varchar(255),
       plz varchar(255),
       ort varchar(255),
       mail varchar(255),
       telefon varchar(255),
       fax varchar(255),
       CONSTRAINT id_teilnehmer UNIQUE (teilnehmer_id),
       CONSTRAINT pk_teilnehmer PRIMARY KEY(pkey),
       CONSTRAINT rel_teilnehmer_kv FOREIGN KEY (fk_kv) REFERENCES kv (pkey) on delete cascade
      );
      


      I think I'm confused with how to do this because of the different JBoss versions (when searching for help in this forum e.g.). For clarity I uploaded my two beans and their dds here: http://www.user.fh-stralsund.de/~sestgran/temp/

      Can anyone turn on the lights on this issue? :(

      Thanks in advance