hi, requesting suggestion on best mapping strategy We have the below class hierarchy.
Class A (abstract) | Class B (abstract) extends A Class E extends A Class F extends A | table E table F Class C extends B Class D extends B table C table D
all classes have multiple properties and sets linking to other entities.this was implemented using union-sub-class strategy Now there is a requirement(business) that table C and D can have a record with the same primary key at a given time. In this strategy Hibernate load fails with the error 'multiple records exist with the same primary key', if we try to access a specific record in C or D it gives an error message an object of a different subclass with the same primary key already loaded in session.Have tried using table per subclass with discriminator however finding it difficult to represent the abstract classes A and B in this strategy hibernate seems to try to select on these ignoring abstract="true" and gives an error 'Table Or view Does not Exist' for the abstract classes. version 3.6
|