Hi all, 

i have a problem and some solutions, but i don't know which one's the best: 

I have some entity beans working with MS SQL Server. When i undeploy my application 
the tables are not destoyed and i don't want them to. The problem is that i want to 
work with an int as Primary Key for those entity beans. That int should be 
auto-increasing if you get what i mean. Every new row in the database should get the 
next number. 

I cannot work with a static int in my bean because when i re-deploy it, it will 
restart counting from 0 and that row would already exist. 

I could make a database acces in every create method to check which the last PK in the 
database was, but i've got the feeling there's a better solution. 

Is there a standard way to work here, or not. What would be the best solution ?? Any 
possibility to make SQL Server do the job itself ??

any help, tips or examples would be really appreciated. 

thanx in advance, 

jef

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to