Eclipse 2023-09: JPA Entity Mappings Not Reflecting in Database Schema
I'm migrating some code and After trying multiple solutions online, I still can't figure this out... I'm working on a Spring Boot project using Eclipse 2023-09, and I'm facing an issue where changes to my JPA entity classes are not being reflected in the database schema. I'm using Hibernate as my JPA provider and have enabled the `spring.jpa.hibernate.ddl-auto` property to `update` in my `application.properties`, but it seems that Eclipse is not recognizing changes to my entities for schema generation. Here’s a snippet of one of my entity classes: ```java @Entity @Table(name = "users") public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(nullable = false) private String username; @Column(nullable = false) private String password; // Getters and Setters } ``` After adding a new field `email` as follows: ```java @Column(nullable = false) private String email; ``` I expected the new column to appear in the database, but it doesn’t. I’ve tried cleaning the project and rebuilding, but that didn’t help. I also checked the console output and found the following warning message: `Hibernate: select next_val from hibernate_sequence where next_val = ?` Additionally, I've verified that my `application.properties` includes: ```properties spring.datasource.url=jdbc:mysql://localhost:3306/mydb spring.datasource.username=root spring.datasource.password=root spring.jpa.hibernate.ddl-auto=update ``` I also ensured that my MySQL JDBC driver is up to date. Does anyone have any insights on why the schema update isn’t being applied? Could this be related to caching or some Eclipse-specific configuration? I appreciate any help or suggestions on how to tackle this issue. Hoping someone can shed some light on this. Any feedback is welcome! Any suggestions would be helpful.