I'm a beginner to Hibernate and have a very little knowledge of its internals. I'm generating POJOs from the xml schema by Hibernate's tool Hbm2Java. When I run that tool, it goes through my model (xml schema) and generates the respective POJOs. But when I open the generated file, the members in the POJOs have invalid data types, which doesn't allow me to compile the code. I have a Hbm2Ddl task as well which generates the .sql file for the same model. Hbm2Ddl generates the .sql file as required. What could be possibly wrong?
Here's how the generated .java file looks like.
import javax.xml.bind.annotation.*;
import java.util.*;
@XmlRootElement
public class MyPojo implements java.io.Serializable {
private integer id;
private double funds;
private string name;
public integer getId() {
return this.id;
}
public void setId(integer id) {
this.id = id;
}
// ---------------- Snipped - Rest of the setters/getters --------------------
}
How can I find why this is happenning?