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

userRepository.save(……)失败 #55

Open
wanzixin opened this issue Sep 9, 2020 · 4 comments
Open

userRepository.save(……)失败 #55

wanzixin opened this issue Sep 9, 2020 · 4 comments

Comments

@wanzixin
Copy link

wanzixin commented Sep 9, 2020

我是用postgersql数据库,最后这里为什么插入不成功啊,是id主键没设置好吗?

@wanzixin
Copy link
Author

wanzixin commented Sep 9, 2020

@dyc87112 博主能帮我解答下嘛

@dyc87112
Copy link
Owner

dyc87112 commented Sep 9, 2020

换了其他数据库的话,注意方言的设置

@wanzixin
Copy link
Author

wanzixin commented Sep 9, 2020

换了其他数据库的话,注意方言的设置

我方言的设置是这样 spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect,出现的问题和上面一样诶

@wanzixin
Copy link
Author

wanzixin commented Sep 9, 2020

@dyc87112 博主我找到问题所在了,在postgresql数据库中user是关键字,不能用来做数据库名,我改成其他的发现ok了

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

2 participants