how to make a Join in ActiveAndroid?
@Table(name="Users")
public class User extends Model {
public User() {
super();
}
@Column(name="name")
public String name;
@Column(name="age")
public int age;
}
and
@Table(name = "Things")
public class Thing extends Model {
public Thing() {
super();
}
@Column(name = "title")
public String title;
@Column(name = "description")
public String description;
@Column(name = "userId")
public int userId;
}
I make such a request. everything works. but I want to get the result of the work, but how? I want to bring to the log:
user.name+" "+user.age+" "+thing.title ........
at my request
public void getJoin(View view) {
new Select().from(User.class).innerJoin(Thing.class).on("User.id = Thing.id").executeSingle();
}
0 comments:
Post a Comment