I have 2 entities:
article
category
then a table:
articles_categories
- articleID
- categoryID
I only have mappings for article and category, and no relationships have been setup as of yet.
Is it possible to build a query to get all articles that are in categoryID=234 ?
No, it’s not possible (using HQL queries). If
articlecontained acategoryIDfield then you would be able to do it, but with a many-to-many relationship table, you’ll need to set up the mappings.It might be possible if you use a native query. But setting up the relationship is the proper thing to do.