在我們的團隊中,我們開始使用MyBatis Generator版本1.3.1和 ,最近我們遷移到版本1.3.2,發現生成的POJO的屬性順序發生了變化。MyBatis生成的pojos中的屬性順序
以前,生成的類中屬性的順序是按字母順序排列的,但是在更改之後,我們已經意識到在XxxKey類中,即匹配表的主鍵的類,屬性不再按字母順序排列。
實施例:
版本1.3.1:
public class PoolChargingKey {
private String billingCycle;
private Integer commercialGroupId;
private Short destinationId;
private Integer tariffPlanId;
private String trafficCase;
private Integer zoneId;
[...]
版本1.3.2:
public class PoolChargingKey {
private Integer commercialGroupId;
private Integer tariffPlanId;
private Integer zoneId;
private Short destinationId;
private String basicService;
private String trafficCase;
[...]
我們正在訪問克對於一些嘲諷的應用,反射的POJO具有反射,屬性順序的改變破壞了它。 我們可以修復受影響的更改,但指出類是如何生成的將很好。
有沒有可能這樣做?我想答案是否定的,但以防萬一。 順便說一句,版本1.3.1中的屬性順序是字母順序。 版本1.3.2中生成的屬性的順序是?
Regards, Tomas。