-->
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: SQL 'default' tag on hibernate.
PostPosted: Tue Aug 29, 2006 12:51 pm 
Newbie

Joined: Thu Aug 24, 2006 5:41 am
Posts: 2
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,


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.