openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: Mapping more than one @ManyToOne relation doesn’t work
Date Mon, 14 Jun 2010 20:30:53 GMT

Hi,
OpenJPA 2.0.x defines the following schema on Postgres as per the domain
model posted:

CREATE TABLE Developer (id BIGINT NOT NULL, name VARCHAR(255), PRIMARY KEY
(id))
CREATE TABLE Participation (id BIGINT NOT NULL, DEVELOPER_ID BIGINT,
PROJECT_ID BIGINT, PRIMARY KEY (id))
CREATE TABLE Project (id BIGINT NOT NULL, name VARCHAR(255), PRIMARY KEY
(id))
ALTER TABLE Participation ADD FOREIGN KEY (DEVELOPER_ID) REFERENCES
Developer (id) DEFERRABLE
ALTER TABLE Participation ADD FOREIGN KEY (PROJECT_ID) REFERENCES Project
(id) DEFERRABLE

1. Please post 
    a) persistence.xml for further analysis
    b) output of $ java -jar /path/to/openjpa.jar

   for further analysis

-----
Pinaki 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Mapping-more-than-one-ManyToOne-relation-doesn-t-work-tp5178742p5179201.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message