Hi,
I have a dao method from a legacy Hibernate implementation:
Code:
public List<T> findWithExample(T exampleInstance, String... excludeProperty) {
Criteria criteria = getSession().createCriteria(getPersistentClass());
Example example = Example.create(exampleInstance);
for (String exclude : excludeProperty) {
example.excludeProperty(exclude);
}
criteria.add(example);
return criteria.list();
}
And I would like to implement it in the JPA2 standard.
I saw I can use some:
Code:
retiurn getEntityManager().find(example);
But I wonder how to specify the excluded properties.
Thanks.