[jboss-user] [EJB 3.0] - Re: How to use all available ID as primary key?
xiaopang
do-not-reply at jboss.com
Mon Mar 17 01:02:44 EDT 2008
create a sequence in the databse like this
create sequense seq
minvalue 100000
maxvalue 999999
start with 100000
increment by 1
nocache
cycle
then set entity bean like this
@Id
@GeneratedValuesstratege=GenerationType.SEQUENCE)
if you want more information about you can look up in the EJB3.0 help ducument .you can download it from www.sun.com.or write to me xiaopang106 at 126.com
you could hava a try but i am not sure it will work
by the way ,how long hava you learn EJB3.0
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136983#4136983
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136983
More information about the jboss-user
mailing list