Hi everyone,
I'm quite new to Hibernate, and in case this question had been posted many times before, I'm sorry for that. I have the following situation:
Table A (Product)
-----------------
- Id (PK)
- related fields
Table B (Product description)
----------------------------
- Id (FK)
- Language
- Description
* There's a composite PK in table B (combination of Id and Language column)
Now, I would like to write a query that returns products - including the description - but only in the language that was passed as a parameter. I tried many things, but I always get a list with all languages, so the parameter has no influence on the result. I can understand why this is the case, but however, I would like to get only the descriptions I need. Is there a way to do this via Hibernate, and if this is possible, what do I have to do then?
I appreciate your help!
regards,
Carl