Package com.axelor.db
Class Query.Selector
- java.lang.Object
-
- com.axelor.db.Query.Selector
-
public class Query.Selector extends Object
A helper class to select specific field values. The record is returned as a Map object with the given names as keys.List<Map> data = Contact.all().filter("self.age > ?", 20) .select("title.name", "fullName", "age").fetch(80, 0);
This results in following query:SELECT _title.name, self.fullName JOIN LEFT self.title AS _title WHERE self.age > ? LIMIT 80
Thefetch(int, int)
method returns a List of Map instead of the model object.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Map>
fetch(int limit, int offset)
String
toString()
List<List>
values(int limit, int offset)
-