我有一个基类:
public class DerivedClass extends BaseClass {
// other stuff
}
派生类:
public class DerivedClass extends BaseClass {
@XmlTransient
private boolean myBool;
}
有没有办法在派生类中覆盖myBool的XML注释,以便例如myBool没有编组到XML?例如类似的东西:
select t1.EventID
,t1.EventName
,t1.EventLocation
,t1.StartDate
,sum(case t2.EvStatus='invit' then 1 else 0 end) as Invited
,sum(case t2.EvStatus='maybe' then 1 else 0 end) as Maybe
,sum(case t2.EvStatus='going' then 1 else 0 end) as Going
from events t1
left join attendance t2
on t1.EventID=t2.EventID
/* insert_where_clause */
group by t1.EventId
t1.EventName
t1.EventLocation
t1.StartDate
我已经看过针对类方法的这个问题的解决方案,例如这里:JAXB inheritance conflict - Re-annotating on sub-classes,但不是会员。