Hi,
I have the following mapping in a class called Address:
@CollectionOfElements(fetch=FetchType.EAGER)
@JoinTable(name="ADDRESS_ADDRESSROWS", joinColumns=@JoinColumn(name="ADDRESSROW_ID"))
private Map<String, String> addressRows = new HashMap<String, String> ();
Now I want to make a HQL / JPA QL query that navigates through the elements of the Map.
How do I address them?
I want to ask something like this:
select from Address as a inner join a.addressRows as aRows where aRows.???= 'street' and aRows.??? like 'Big Street 1'.
Is it possible to make a query like this in HQL and/or JPA QL?
Or it the SQL the way to go?
Using Criteria this would be very elegant, unfortunately it does not work (the reason why is listed under the hibernate advanced FAQ).
Regards!
|