I have following database design: A Project has multiple Categories : stored in ProjectCategory table with ProjectId as one column A Project has multiple Types: stored in ProjectType table with ProjectId as one column A Project has multiple Locations: stored in ProjectLocation table with ProjectId as one column
The Project will have other properties associated with it in Project table.
Now I want to construct a ProjectCatTypeLoc object which will have List<Category>, List<Type> and List<Location> in it. I use this object to store/retrieve only the project category, type and locations and not the Project properties itself (Which will be done using Project class itself).
This means that I don't have a corresponding table in DB for ProjectCatTypeLoc class.
How can I achieve this using Hibernate? Am I doing something wrong here?
|