JPA polymorphic oneToMany
- by bob
I couldn't figure out how to cleanly do a tag cloud with JPA where each db entity can have many tags.
E.g
Post can have 0 or more Tags
User can have 0 or more Tags
Is there a better way in JPA than having to make all the entities subclass something like Taggable abstract class? Where a a Tag entity would reference many Taggables.
thank you