Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 4: org.hibernate.exception.SQLGrammarException: could not prepare statement #125

Open
JerryFinn opened this issue Jan 28, 2023 · 0 comments

Comments

@JerryFinn
Copy link

This problem is because the table user, "user" is a reserve word, so if when you submit to register a user you get the above error. The solution has been noted in the post in a later version of this book by user https://github.com/Dieblich
habuma/spring-in-action-6-samples#7

To repeat here, where I first found it, the solution is ...
<<
Spring cannot create the data-table.

I solved this issue with an annotation for the table:

import javax.persistence.Table;
...
@table(name="TACO_USER")
public class User implements UserDetails {
...

This worked for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant