Hi,
I am using hibernate 4.0.1 with sql server 2008. I am facing one serious problem here.
I am trying generate pojo and hbm files using hibernate reverse engineering tool. Files are getting generated properly, But the the datatypes like nchar, nvarchar are converted to Serializable type instead of String or text. Please see the below POJO . Can you help me what need to be done for this. In this below code itemcode, manufacture, producttype etc are nchar/nvarchar datatype(Sql server 2008) but the generrated type is Serializable . Please help me.
public class IpmsMakeModelMaster implements java.io.Serializable {
private Serializable itemCode;
private Serializable manufacture;
private Serializable productType;
private Serializable model;
private Serializable variant;
private Long exShowroomPrice;
private Long cc;
private Integer seatingCapacity;
private Serializable fuel;
private Long tonnage;
private Serializable segment;
public IpmsMakeModelMaster() {
}
public IpmsMakeModelMaster(Serializable itemCode) {
this.itemCode = itemCode;
}
public IpmsMakeModelMaster(Serializable itemCode, Serializable manufacture,
Serializable productType, Serializable model, Serializable variant,
Long exShowroomPrice, Long cc, Integer seatingCapacity,
Serializable fuel, Long tonnage, Serializable segment) {
this.itemCode = itemCode;
this.manufacture = manufacture;
this.productType = productType;
this.model = model;
this.variant = variant;
this.exShowroomPrice = exShowroomPrice;
this.cc = cc;
this.seatingCapacity = seatingCapacity;
this.fuel = fuel;
this.tonnage = tonnage;
this.segment = segment;
}
public Serializable getItemCode() {
return this.itemCode;
}
public void setItemCode(Serializable itemCode) {
this.itemCode = itemCode;
}
public Serializable getManufacture() {
return this.manufacture;
}
public void setManufacture(Serializable manufacture) {
this.manufacture = manufacture;
}
public Serializable getProductType() {
return this.productType;
}
public void setProductType(Serializable productType) {
this.productType = productType;
}
public Serializable getModel() {
return this.model;
}
public void setModel(Serializable model) {
this.model = model;
}
public Serializable getVariant() {
return this.variant;
}
public void setVariant(Serializable variant) {
this.variant = variant;
}
public Long getExShowroomPrice() {
return this.exShowroomPrice;
}
public void setExShowroomPrice(Long exShowroomPrice) {
this.exShowroomPrice = exShowroomPrice;
}
public Long getCc() {
return this.cc;
}
public void setCc(Long cc) {
this.cc = cc;
}
public Integer getSeatingCapacity() {
return this.seatingCapacity;
}
public void setSeatingCapacity(Integer seatingCapacity) {
this.seatingCapacity = seatingCapacity;
}
public Serializable getFuel() {
return this.fuel;
}
public void setFuel(Serializable fuel) {
this.fuel = fuel;
}
public Long getTonnage() {
return this.tonnage;
}
public void setTonnage(Long tonnage) {
this.tonnage = tonnage;
}
public Serializable getSegment() {
return this.segment;
}
public void setSegment(Serializable segment) {
this.segment = segment;
}
}
|