Skip to content

Instantly share code, notes, and snippets.

View gsobrevilla's full-sized avatar
🇦🇷

Gastón Sobrevilla gsobrevilla

🇦🇷
  • Tucumán, Argentina
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gsobrevilla on github.
  • I am gsobrevilla (https://keybase.io/gsobrevilla) on keybase.
  • I have a public key ASDlhLA0T9HA6QmgFoMiYCJHdCJOxDwwRJDZWZFO5qCizQo

To claim this, I am signing this object:

@gsobrevilla
gsobrevilla / gist:e1c3e845df58c4a79665
Created August 14, 2014 19:46
Many to many relationships Active Android - getManyThrough
import java.util.List;
import com.activeandroid.Model;
import com.activeandroid.query.Select;
public class BaseModel extends Model{
protected <T extends Model> List<T> getManyThrough(Class<T> targetClass, Class<T> joinClass, String targetForeignKeyInJoin, String foreignKeyInJoin){
return new Select()
.from(targetClass)