Hello,
I have the following entity mapping:
Code:
public MyEntity {
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "my_entity_name_lv", joinColumns = @JoinColumn(name = "my_entity_pk"), indexes = { @Index(columnList = "my_entity_pk") })
@MapKeyColumn(name = "locale")
private Map<Locale, LocalizedValue> name;
}
where LocalizedValue is the following @Embeddable:
Code:
@Embeddable
public class LocalizedValue implements Localized {
/**
* Default serial version uid.
*/
private static final long serialVersionUID = 1L;
@Column(name = "value")
private String value;
Now I want to select all of MyEntity which have the name "My name", so I do the following query:
Code:
select p from my_entity as p join p.name as n where :name in (VALUE(n))
and I pass the name as parameter to the query. The problem is I keep getting these warnings from Hibernate:
Code:
HHH90000016: Found use of deprecated 'collection property' syntax in HQL/JPQL query ...
How can I transform the query to get rid of these warnings?