A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java 8 in Action
this week in the
Object Relational Mapping
One - to -one mapping using non primary key
Joined: Jan 03, 2008
Oct 11, 2011 09:38:02
I have two tables:
Lid: primary key
In both the cases email is neither primary key, nor the foreign. Is it possible to establish one-to-one mapping between both of these tables for the column email. I am using xml for mapping.
Joined: Oct 01, 2007
Oct 12, 2011 07:09:59
Are you using JPA? JPA requires the
reference the Id, but some JPA providers allow this.
In EclipseLink this is supported, but possibly not through JPA config, you may need to use a customizer.
Blog:Java Persistence Performance
rocket mass heater
subject: One - to -one mapping using non primary key
problem with on to one mapping in hibernate
many-to-many mapping in the hibernate mapping file ?
Hibernate one-to-on id mapping issue
Problem for fetching results from 2 tables which do not have relation...
hibernate and DB triggers
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014