Will hibernate ever support bidirectional any associations? I mean where the reference is made by a pair of kind-id instead of a normal fk, so that the target could be of different kind~class~entity~table (of course, fk constraints should not be generated here). I've tried a number of workarounds but they are far from ideal (custom queries, @where clauses, unidirectional any associations). I think this is a nice to have since associations to interfaces are pretty common and sometimes it's very difficult to map them to any of the hierarchy mappings that hibernate provides, because any class can implement an interface, not just a class that inherits from some common root. And although against database purisms it's a customary solution when the entity association needs to be flexible enough.
Cheers,
Carlos
|