nutzam/nutz — Issue #156: dao对于继承对象有点小郁闷。
Author: enzozhong
Created: 2012-02-16 01:17:49+00:00
State: open

商品父类
public abstract class Merce {

@Id
private Long merceId;
@Many(target = Ticket.class, field = "ticketId")
private List ticketList;
}

@Table("a")
public class A extends Merce {

@Column
private String aaa;
}

@Table("b")
public class B extends Merce {

@Column
private Integer bbb;
}

订单类
@Table("ticket")
public class Ticket {

@Id
private Long ticketId;
@Column
private Long goodId;
@One(target = Merce.class, field = "goodId")
private Merce merce;
}

有什么办法查询查询父类的时候也一起把他们的子类也查询出来呢？
可否弄成类似hibernate那样子类和父类同在一个表里面？