On my computer middlegen created the fields in one order, and on the other two developers machines it created them in a different order. To my knowledge we all had the same versions of elcipse, middlegen, tomcat, mysql and ant. So we ended up just having them run middlegen every time. Well now they have both quit so I'm trying to figure out if I can create the persistent objects in the same order, since all our code now relies on the constructors to be in order.
Does anyone know how middlegen determines the order of fields? Here is what the existing persistent objects look like. You can see that on the full constructor the order is different, container is in a different place. Any idea why that could be or how to change it?
/** identifier field */
private Integer containerId;
/** nullable persistent field */
private String containerLabel;
/** nullable persistent field */
private String fullnessStatus;
/** nullable persistent field */
private Double height;
/** nullable persistent field */
private Double width;
/** nullable persistent field */
private Double len;
/** nullable persistent field */
private Double weight;
/** nullable persistent field */
private Date cycleCountDateTime;
/** nullable persistent field */
private Date lastUpdateDateTime;
/** nullable persistent field */
private Integer lastUserId;
/** nullable persistent field */
private String lastSource;
/** persistent field */
private com.boxworks.wms.persist.Location location;
/** persistent field */
private com.boxworks.wms.persist.Warehouse warehouse;
/** persistent field */
private com.boxworks.wms.persist.OrderHeader orderHeader;
/** persistent field */
private com.boxworks.wms.persist.Container container;
/** persistent field */
private com.boxworks.wms.persist.ContainerType containerType;
/** persistent field */
private com.boxworks.wms.persist.Resource resource;
/** persistent field */
private Set worksByContainerId;
/** persistent field */
private Set worksByDestinationContainerId;
/** persistent field */
private Set inventories;
/** persistent field */
private Set containers;
/** full constructor */
public Container(String containerLabel, String fullnessStatus, Double height, Double width, Double len, Double weight, Date cycleCountDateTime, Date lastUpdateDateTime, Integer lastUserId, String lastSource, com.boxworks.wms.persist.Location location, com.boxworks.wms.persist.Warehouse warehouse, com.boxworks.wms.persist.OrderHeader orderHeader, com.boxworks.wms.persist.Container container, com.boxworks.wms.persist.ContainerType containerType, com.boxworks.wms.persist.Resource resource, Set worksByContainerId, Set worksByDestinationContainerId, Set inventories, Set containers) {
this.containerLabel = containerLabel;
this.fullnessStatus = fullnessStatus;
this.height = height;
this.width = width;
this.len = len;
this.weight = weight;
this.cycleCountDateTime = cycleCountDateTime;
this.lastUpdateDateTime = lastUpdateDateTime;
this.lastUserId = lastUserId;
this.lastSource = lastSource;
this.location = location;
this.warehouse = warehouse;
this.orderHeader = orderHeader;
this.container = container;
this.containerType = containerType;
this.resource = resource;
this.worksByContainerId = worksByContainerId;
this.worksByDestinationContainerId = worksByDestinationContainerId;
this.inventories = inventories;
this.containers = containers;
}
/************************
*************************
************************/
And here is what mine generates.
/** identifier field */
private Integer containerId;
/** nullable persistent field */
private String containerLabel;
/** nullable persistent field */
private String fullnessStatus;
/** nullable persistent field */
private Double height;
/** nullable persistent field */
private Double width;
/** nullable persistent field */
private Double len;
/** nullable persistent field */
private Double weight;
/** nullable persistent field */
private Date cycleCountDateTime;
/** nullable persistent field */
private Date lastUpdateDateTime;
/** nullable persistent field */
private Integer lastUserId;
/** nullable persistent field */
private String lastSource;
/** persistent field */
private com.boxworks.wms.persist.Container container;
/** persistent field */
private com.boxworks.wms.persist.Location location;
/** persistent field */
private com.boxworks.wms.persist.Warehouse warehouse;
/** persistent field */
private com.boxworks.wms.persist.Resource resource;
/** persistent field */
private com.boxworks.wms.persist.ContainerType containerType;
/** persistent field */
private com.boxworks.wms.persist.OrderHeader orderHeader;
/** persistent field */
private Set worksByDestinationContainerId;
/** persistent field */
private Set worksByContainerId;
/** persistent field */
private Set containers;
/** persistent field */
private Set inventories;
/** full constructor */
public Container(String containerLabel, String fullnessStatus, Double height, Double width, Double len, Double weight, Date cycleCountDateTime, Date lastUpdateDateTime, Integer lastUserId, String lastSource, com.boxworks.wms.persist.Container container, com.boxworks.wms.persist.Location location, com.boxworks.wms.persist.Warehouse warehouse, com.boxworks.wms.persist.Resource resource, com.boxworks.wms.persist.ContainerType containerType, com.boxworks.wms.persist.OrderHeader orderHeader, Set worksByDestinationContainerId, Set worksByContainerId, Set containers, Set inventories) {
this.containerLabel = containerLabel;
this.fullnessStatus = fullnessStatus;
this.height = height;
this.width = width;
this.len = len;
this.weight = weight;
this.cycleCountDateTime = cycleCountDateTime;
this.lastUpdateDateTime = lastUpdateDateTime;
this.lastUserId = lastUserId;
this.lastSource = lastSource;
this.container = container;
this.location = location;
this.warehouse = warehouse;
this.resource = resource;
this.containerType = containerType;
this.orderHeader = orderHeader;
this.worksByDestinationContainerId = worksByDestinationContainerId;
this.worksByContainerId = worksByContainerId;
this.containers = containers;
this.inventories = inventories;
}
|