Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3
Mapping documents: annotations
Code between sessionFactory.openSession() and session.close(): none yet
Full stack trace of any exception that occurs: none yet
mySQL 5.0.67:
The generated SQL (show_sql=true): none yet
Debug level Hibernate log excerpt:none yet
Hello, I am a relative newbie to Hibernate and am unable to find an answer to a question. I am not sure if I have a bad design, or expectations but I would greatly appreciate any advice you can offer for a new project:
I have an address table that I want to share with employee, customer, company, and possibly other entities that have an address. Is it possible to have a onetoone between each of these and the address? As I understand it, a lookup table would only link address and one other type (employee for example). That works if I want to find the address of an employee, but not if I want to go the other direction - asking an address who owns it. Is this a valid approach, or should I have a seperate address table for each type such as employeeAddress, customerAddress tables, etc?
Thank you very much for your time and patience.