-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
Milestone
Description
Issue Overview
A service can only query its entity when using criteria support
Current Behaviour
Example in service below we can only select cars when we use criteria:
public class CarService extends CrudService<Car, Integer> implements Serializable {
public List<Car> listByModel(String model) {
return criteria() //the instance of criteria can only query Car entity
.likeIgnoreCase(Car_.model, model)
.getResultList();
}
}
Expected Behaviour
Make it possille to pass an entity as parameter for criteria() method:
public List<SalesPoint> listSalesPointsByName(String name) {
return criteria(SalesPoint.class)
.likeIgnoreCase(SalesPoint_.name, "%"+name + "%")
.getResultList();
Additional Information
- Affected version: 1.0.2