findIds (find the list of ids of a given query)

If you're only interested in the Ids of a given model, you can use the findIds method on the query The following code retrieves a list of Ids.
List<Long> ids = DB.find(Customer.class).where().ilike("name", "Rob%"").findIds();
for (Long id : ids) {
  // Do something with the ID's

The generated SQL only selects the id from the table (even if you use the select clause)

select from Customer t0 where lower( like 'Rob%'