Hello,
I am trying to map a complex hierarchy of objects with the joined-subclass strategy, using annotations. Since the hierarchy is complex and there are many relationships involved, however, Hibernate ends up generating huge SQL queries with over 60 joins to figure out the actual type of each row, which leads to MySQL generating an error.
Is there a way to force Hibernate to use a discriminator column, using annotations, to determine the type of object and reduce the number of joins involved? I even tried using @ForceDiscriminator with no effect.
The Hibernate documentation seems to imply that this is possible when using an XML configuration, but I haven't found a way to do it with annotations.
Thanks for any help.
|