JPA polymorphic oneToMany

Posted by bob on Stack Overflow See other posts from Stack Overflow or by bob
Published on 2010-05-26T16:38:06Z Indexed on 2010/05/26 16:41 UTC
Read the original article Hit count: 184

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about java

Related posts about jpa