In our team we started using MyBatis Generator version 1.3.1, and we just recently migrated to version 1.3.2 and found a change in the order of attributes of the generated POJOs.
Previously, the order of the attributes in the generated classes was alphabetical, but after the change, we've realized that in the XxxKey classes, i.e., the classes that match the primary key of the table, the order of the attributes is no longer alphabetical.
Example:
Version 1.3.1:
public class PoolChargingKey {
private String billingCycle;
private Integer commercialGroupId;
private Short destinationId;
private Integer tariffPlanId;
private String trafficCase;
private Integer zoneId;
[...]
Version 1.3.2:
public class PoolChargingKey {
private Integer commercialGroupId;
private Integer tariffPlanId;
private Integer zoneId;
private Short destinationId;
private String basicService;
private String trafficCase;
[...]
We are accessing the generated POJOs with reflection for some mocking utils, and the change in the attributes order broke it. We can fix the affected changes, but it would be great to indicate how the classes are generated.
Is it possible to do that? I guess the answer is no, but just in case. By the way, the attribute order in version 1.3.1 was alphabetic. In which order are the attributes generated in version 1.3.2?
Regards, Tomas.