Share « Key « JPA Q&A





1. Hibernate zeroToOne    stackoverflow.com

I am trying to establish a relationship between 2 entities which would be zero-to-one. That is, the Parent can be saved without the associated Child entity and also along with the ...

2. Tables sharing the same pk    forum.hibernate.org

Hello, I have two tables that share the same primary key. My question is how to setup the hbm config to have the ID shared. Currently I solve it the DAO. Person.PKField1 = Pet.PKField1 I've setup a one-to-one relation from Person, as Pet is only available through a person. I've set cascade to none and as a pet is optional fetch="select". ...

3. Question about one-to-one shared primary key    forum.hibernate.org

4. 2 many-to-one references with 'shared' keys    forum.hibernate.org

Hibernate version: 2.1.6 Hi, i know, that my problem is not really a 'hibernate'-problem, but perhaps someone has an idea i don't had... and perhaps it's not possible to handle it 'automatically' ... or there's a workaround ... I've got a Class A with some attributes: Code: /** * many-to-one --> Class B * not-null=false * outer-join=true ...

5. 2 table share same primary key    forum.hibernate.org

Hi, I have a table which is create table A( id NUMBER(19,0), name VARCHAR2(255), primary key (id) ) and another table create table B( id NUMBER(19,0), filedName VARCHAR2(255), primary key(id) ) Here table A's primary key is the same as table B's primary key, how to do this in hibernate? (My application does not allow me to merge two table into ...

6. One to one shared primary key    forum.hibernate.org

7. one-to-one relashionship without shared primary key    forum.hibernate.org

Hello. Is there any way to map a one-to-one relashionship via just a foreign key, not a shared primary key? DB schema is like this: Code: TABLE whole( id_whole INTEGER NOT NULL, ...other attributes go here...., PRIMARY KEY(id_whole) ); TABLE part1( ...

8. One-to-One sharing PK problem!    forum.hibernate.org

Hibernate version: Hibernate 3.2 Hibernate Annotations 3.2.0.CR2 Name and version of the database you are using: McKoi Database v.1.0.3 The Problem I'm trying to save two entities in the database. They have a One-to-One relationship sharing primary keys, but their values stored in the database differ. When i saw that i tried to use an incremental @GenericGenerator in one of the ...

9. One To One with shared primary key    forum.hibernate.org