Hi,
I have the following table creating in sql way:
CREATE TABLE `system` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(20) default 'external',
PRIMARY KEY (`id`)
);
but I want use x-doclet (to generate hbm files) and then use hbm2dll tool to generate db schema.
Question is:
how do 'default' sql statement on hibernate?
My class (as you can see there is no default statement because I couldn't found it in hibernate tags):
/**
*
* @hibernate.class table = "system"
*/
public class System {
private Long id;
private String name;
/**
* @hibernate.id column="id" generator-class="native"
*/
public Long getId() {
return id;
}
protected void setId(Long id) {
this.id = id;
}
/**
* @hibernate.property column="name"
*/
public String getName() {
return name;
}
public String setName(String name) {
this.name = name;
}
Sorry - I know that my english is weak.
Best Regards,
|