If I understand the issue correctly, the SocialSecurity
is a field of the MWId
embeddable. If you want to access it with a query, you will need to navigate to it through your embedded Id like this:
SELECT mw FROM MemberWorkout mw WHERE mw.id.SocialSecurity...
I am assuming that the property name is capitalized, as in your code. If not, replace it with the proper name.
Please note that you are using property access, meaning that because the accessor method is annotated, you need to name the property in your query according to the JavaBean standard (getId()
means that HQL and JPQL will access the preperty as id
). If you annotate the field, you will need to change the query to mwId
.