Hi everyone, I have a problem when trying to add an entry to a table. The context is that I have an application where a user can follow plants and gets info from their status (air moisture, watering, etc...). The first 2 entries get saved in the database correctly, but when I try to add a third, I get an error (see below).
It seems like the second query gets executed again and this gives the error (even though a complete different query was executed). By doing some debugging, I can see that the parameters passed are actually correct in the repository and in the service.
Doing some research I found out that it could be an hibernate flush problem(???), but I cannot manage to force a flush. I already tried to set the batch size to 1, but that didn't help.
Any suggestions?
#Springboot application: problem with Hibernate flush (maybe)
14 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @umbral robin! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
💤 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.
.
💤 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.
.
are you inserting the same thing multiple times?
Or does the user have the same plant multiple times?
💤 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.
Hi
If you have a different question, please create your own post