-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Reverse Engineering issue with SQL Server 2008 data types
PostPosted: Mon Jan 28, 2013 7:21 am 
Newbie

Joined: Mon Jan 28, 2013 3:20 am
Posts: 2
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;

}



}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.