Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0.5
Name and version of the database you are using: Oracle 8.1.0.5
I’m writing a J2EE application with a legacy Oracle database design.
I have three tables that all have a one-to-many connection to a properties table. The properties table has a prop_type to tell what kind of property it is.
Code:
-------- ----------- -----------
|Job | |Prop | |Number |
|Job_id|------->|Prop_id |<----|Number_id|
|... | | |Prop_type| |... |
-------- | |... | -----------
| -----------
--------- |
|Call | |
|Call_id|----
|... |
---------
I need a set in the Job, Number and Call classes that link with the follow conditions.
Job_id = Prop_id and Prop_type=’J’
Number_id = prop_id and prop_type = ‘N’
Call_id = prop_id amd prop_type=’C’
1. How do I write the map entry with different column names?
2. How do I limit the set to include the right property type?
Thanks
James Hayes