Hi, looking at your tutorial and I think its imcomplete.
For instance, when your creating your address table you leave out person_id foreign key reference.
Also, you never actually use the JoinColumn annotation on your Person member variable in the address class....
Am I wrong on how this works? How would your address know how to map to the person class through the foreign id?
incomplete tutorial?David Brave September 17, 2011 at 4:56 AM
Hi, looking at your tutorial and I think its imcomplete. For instance, when your creating your address table you leave out person_id foreign key reference. Also, you never actually use the JoinColumn annotation on your Person member variable in the address class.... Am I wrong on how this works? How would your address know how to map to the person class through the foreign id?
Isn't it the other way round?Maximilian Eberl August 23, 2012 at 6:08 PM
A person has an address (or more). Not: an address has a person.
computerbizuneh girma November 13, 2012 at 6:57 PM
i want to the example one to one relation
Post your Comment