File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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
I agree. Here's the link:
subject: One - to -one mapping using non primary key
hibernate and DB triggers
Hibernate one-to-on id mapping issue
many-to-many mapping in the hibernate mapping file ?
problem with on to one mapping in hibernate
Problem for fetching results from 2 tables which do not have relation...
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015