Open HamzehSoboh opened 6 years ago
This worked for me. Hope it helps
public static List
Hello. ActiveAndroid no longer be maintained. You can use ReActiveAndroid, it's based on ActiveAndroid.
For example, you can select specific columns:
List<Note> notes = Select.columns("id", "text").from(Note.class).fetch();
You need to provide an Array of Strings instead of just String params, so do this instead:
new Select( new String[]{ "cached_id, group_id, server_time" } ).from( CachedObject.class ).where( "type = ?", 3 ).execute();
I'm trying to fetch only 2 columns from my table, as the rest are not needed and -more important- very heavy, and if fetched then I'll have a memory leak!
new Select("cached_id", "group_id", "server_time").from(CachedObject.class).where("type = ?", 3).execute()
Having cached_id the primary key. I'm getting the correct records, but with full data (all columns), including the very heavy and not needed ones!
Any idea how to solve that?