Hibernate @GeneratedValue problem
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I am using mysql,hibernate ,spring
Executing above code doesnot work.
Exception listing are
please help me in this, the problem is with generation_type, but I cannot correct it.
please..it's urgent
Executing above code doesnot work.
Exception listing are
please help me in this, the problem is with generation_type, but I cannot correct it.
please..it's urgent
posted 17 years ago
Your table 'login' is not created in database
and you are trying to save in it !!!
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'library.login' doesn't exist
Your table 'login' is not created in database
and you are trying to save in it !!!
subhanair girish
Greenhorn
Posts: 13
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
The table 'login' gets created if I am not writing @GeneratedValue in the @id field.
I am using mysql database that can take only GenerationType=IDENTITY to start the autoincrement feature.
I am using mysql database that can take only GenerationType=IDENTITY to start the autoincrement feature.
posted 17 years ago
use userid as Long or Interger it will work.
May be For String GeneratedValue will not work
Tannking you
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
use userid as Long or Interger it will work.
May be For String GeneratedValue will not work
Tannking you
subhanair girish
Greenhorn
Posts: 13
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Thanks a lot . Its working perfectly now...
Thanks thanks
I do have one more issue.Its about setting foreign key in the table. I tried many ways, but it's not working.
I have two table
partner( idno(pk) , verifno)
user(userid(pk), idno(fk),username)
How to set foreignkey relation in the user table.
Please help me in this.......
Thanks thanks
I do have one more issue.Its about setting foreign key in the table. I tried many ways, but it's not working.
I have two table
partner( idno(pk) , verifno)
user(userid(pk), idno(fk),username)
How to set foreignkey relation in the user table.
Please help me in this.......
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
You should make your @Id field with Long type or remove @GeneratedValue. Because GeneratedValue you could write only in Long type fields
| We begin by testing your absorbancy by exposing you to this tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |







