A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
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
It is sorta covered in the
JavaRanch Style Guide
subject: One - to -one mapping using non primary key
hibernate and DB triggers
Problem for fetching results from 2 tables which do not have relation...
many-to-many mapping in the hibernate mapping file ?
problem with on to one mapping in hibernate
Hibernate one-to-on id mapping issue
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014