Hi ..
I have a little problem with hibernate and I'm not even sure how to search for it on google.
So here it goes.
I have several entity tables (entity1, entity2, entity3) and I have a Tag table. To connect them together I created many to many tables entity1_tag, entity2_tag, entity3_tag. I separated them, because I know now that these tables will be huge. So I'm writing a a method that loads my entities by Tag. Is there a way for hibernate to load all entity records for desired tag or I have to load this manualy for each many to many relation?
for example: if I execute method List entities = EntityLoader.loadByTag(MyTag);
I would like to get all entities. Entity1, Entity2, Entity3 ( of course if all entities were tagged by the same tag)
Is there a way to achieve that and how ? Also any examples would be much appreciated
Kind regards
Armando
|