How to fix Error executing DDL alter table events drop foreign key FKg0mkvgsqn8584qoql6a2rxheq via JDBC Statement
In my case the problem why i got this exception was, that some tables had names which are reserved for postgreSQL. eg. "Like" or "User". Changed name with:
@Table(name="likes")
and it worked fine.
Perhaps someone has the same problem.
Error executing DDL alter table if exists task.city
Hmm, try
public class House {
...
@ManyToOne(optional = false)
@JoinColumn(name = "city_id", referencedColumnName = "id")
private Set<City> city;
...
}
btw,
- should not use @Data lombok in an entity class
- spring.jpa.hibernate.ddl-auto=update can change
update
tonone
. You should manage schema on your own.
Error executing DDL alter table add constraint foreign key () references (id) via JDBC Statement
I noticed in db, duplicates tables were being created so that's why i was getting that error
Adding below annotation solved my problem :
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
Related Topics
How to Get an Http Response Body as a String
Android Get Height of Webview Content Once Rendered
Spring Data Repository @Query - Update and Return Modified Entity
Spring Boot Return 204 No-Content When List Is Empty
How to Remove the Slashes from Json Key While Converting Object into String
Dynamic Placeholder Substitution in Properties in Java
Opening Intent Crashing the App Android Studio
How to Query Dynamodb Based on Partition Key and Sort Key [Java]
Forward Httpservletrequest to a Different Server
How to Read All Classes from a Java Package in the Classpath
Jsr 303 Validation, If One Field Equals "Something", Then These Other Fields Should Not Be Null
How to Mark Cucumber Junit Step as Failed But Continue
Prevent Empty Values on String Split
Print Out All Possible Combinations of an Arraylist<Arraylist<String>> Recursively
When I Run Mockito Test Occurs Wrongtypeofreturnvalue Exception
How Find Given Number Is Octal or Not
How to Do Post Request With Raw Data Via Spring Rest Template