Hibernate Version 3.1.3
I have a situation with existing tables. There is a single table called "business" with a primary key generated by sequence.
Then I have types of businesses (8 to be exact) which use "business" tables PK, as a [PK,FK] into their types of tables.
The basis is that there are 8 types of businesses we handle, but only one valid business type exists for each "business". So my original thought was to use a one-to-one but whenever I do get() or list(), it joins the 8 tables. I would rather it not as the 8 tables in the future may expand to more than 8.
I then tried a one-to-many from business, to type of business which does not perform the join (possibly because of proxying) and does the right thing.
I do not feel that this is the best solution, and was hoping someone may give some insight into this. Possibly offer up better design or improvement ideas.
Thanks,
|