hello, does anyone here knows the correct way of associating a single entity(a pojo class) to multiple classes.. im currently working on a situation where mainClass has a one-to-many relationship to subClass and subClass has one-to-many relationship to unitsClass too. the relationship of these classes looks like this:
- mainClass - oneToMany - subClass
- subClass - manyToOne - mainClass AND oneToMany - unitsClass
- unitsClass - manyToOne - subClass
i dont know if its possible for subClass to contain multiple associations to multiple classes.if not, what would be the best way to address this problem? im using hibernate annotations.
hope someone could help me out on this.
thank you so much!