column "client_id" of relation "payments" does not exist
hey guys. can smb help me out? in my java project i have this entity:
and in my service i just use this:
and in my db my column is called:
clientId
.
and i keep getting error:
Can smb help me out? thx8 Replies
⌛
This post has been reserved for your question.
Hey @bambyzas! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Well, your table payments does not have a column client_id
i know. but why is my app expecting
client_id
column?... because of the clientId field
if in application.properties you have
spring.jpa.hibernate.ddl-auto=update
and you don't have column in database but you have just added clientId
then hibernate should create that column and your table should be updated in database.
with update
the schema is updated.
for me in MySQL created without your error.
delete clientId
. Let client_id
to be createdNever, ever, set ddl-auto to anything other than create-drop if you're just starting your project, or disabled when you have it running in production
You should write migrations yourself
I guess he is in development
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.