Dear Members
I have an Entity class (among others) declared in this way
Code:
@Entity
@Table(name = "articulo")
public class Articulo implements Serializable {
private static final long serialVersionUID = 1L;
private Long idArticulo;
private String codigoArticulo;
private String descripcionArticulo;
private BigDecimal stockActualArticulo;
private BigDecimal stockMinimoArticulo;
private BigDecimal costoUnitarioArticulo;
private BigDecimal totalValorizadoArticulo;
private Medida medida;
private LineaCategoria lineaCategoria;
Notice the order of the class's properties,
the getters and setters are generated in the same order than each property with Eclipse and the getters are annotated with the respective annotation need it from
javax.persistence.*.
Then
Hibernate creates the respective table mapping for mysql , here no problem
But I did realize the follow, when I do
desc articulo in MySQL I get
Code:
| Field |
| |
|------------------------+
|idArticulo |
|codigoArticulo |
|costoUnitarioArticulo |
|descripcionArticulo |
|stockActualArticulo |
|stockMinimoArticulo |
|totalValorizadoArticulo |
|idLineaCategoria |
|idMedida |
It has a complete different order than the order of the properties declared in the class, is normal this?
Exists an option to force Hibernate to respect the order of the properties of my class to be represented in a 100% in the same order in the Mysql's table?
Thanks in Advanced