@Table("a_table")
public class ATable {
@Id
private long id;
@Column("username")
private String username;
@Column("bid")
private long bid;
@One(field = "bid", target = BTable.class)
private BTable btable;
}
@Table("b_table")
public class BTable {
@Id
private long id;
@Column("title")
private String title;
}
有这样的查询:
select * from a_table a, b_table b where a.bid=b.id and a.username='who' and b.title = 'this is title';
请问如何实现查询结果为:
List<ATable> list = ...
添加回复
请先登陆