Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.0x (alpha tools 4)
Mapping documents:
Code:
<hibernate-mapping package="teste">
<class
name="ClassT"
table="ClassT"
>
<meta attribute="extends">teste.Stest</meta>
<meta attribute="class-code">
</meta>
<id
column="idClass"
name="idClass"
type="java.lang.Integer"
>
<generator class="increment">
</generator>
</id>
<property
name="notVisible"
column="visible"
type="string"
not-null="true"
>
<meta attribute="gen-property">false</meta>
</property>
</class>
</hibernate-mapping>
The generated POJO:Code:
package teste;
import java.util.*;
/**
* ClassT generated by hbm2java
*/
public class ClassT extends teste.Stest implements java.io.Serializable {
// Fields
private Integer idClass;
private String notVisible;
// Constructors
/** default constructor */
public ClassT() {
}
/** constructor with id */
public ClassT(Integer idClass) {
this.idClass = idClass;
}
// Property accessors
/**
*
*/
public Integer getIdClass() {
return this.idClass;
}
public void setIdClass(Integer idClass) {
this.idClass = idClass;
}
/**
*
*/
public String getNotVisible() {
return this.notVisible;
}
public void setNotVisible(String notVisible) {
this.notVisible = notVisible;
}
// The following is extra code specified in the hbm.xml files
// end of extra code specified in the hbm.xml files
}
Comments
Well I'm missing the old gen-property meta tag now... the notVisible attribute is implemented in the super class (Stest) and I don''t want to generate the method in the persistent class... is there a new way to do that? is it a bug ?
Thanks.