myecclipse6.01生成POJO的一个问题 希望高手指点!
myecclipse6.01 hibernate3.1反向工程的问题 Myuser表没问题,就三个字段id,name,pass都是VARCHAR(20).
我是新装的myecclipse6.01 用hibernate3.1做反向工程生成Myuser表的pojo, 可每次他都会生成二个类MyuserId和Myuser,Myuser.hbm.xml里面内容也是
<hibernate-mapping>
<class name="pojo.Myuser" table="myuser" catalog="gwj">
<composite-id name="id" class="pojo.MyuserId">
<key-property name="id" type="java.lang.String">
<column name="id" length="20" />
</key-property>
<key-property name="name" type="java.lang.String">
<column name="name" length="20" />
</key-property>
<key-property name="pass" type="java.lang.String">
<column name="pass" length="20" />
</key-property>
</composite-id>
</class>
</hibernate-mapping>
public class Myuser implements {
// Fields
private MyuserId id;
// Constructors
/** default constructor */
public Myuser() {
}
/** full constructor */
public Myuser(MyuserId id) {
this.id = id;
}
// Property accessors
public MyuserId getId() {
return this.id;
}
public void setId(MyuserId id) {
this.id = id;
}
}
public class MyuserId implements {
// Fields
private String id;
private String name;
private String pass;
// Constructors
/** default constructor */
public MyuserId() {
}
/** full constructor */
public MyuserId(String id, String name, String pass) {
this.id = id;
this.name = name;
this.pass = pass;
}
// Property accessors
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getPass() {
return this.pass;
}
public void setPass(String pass) {
this.pass = pass;
}....
这是什么原因?请高手指点一下吧.