Relative Content

Tag Archive for javaspring-boothibernatespring-data-jpa

Spring Data JPA, ManyToMany relation with a new entity

I am learning Spring Data JPA and I am trying to build ManyToMany relation between class Account and class Authority (role). Apart from that, i want to track the history when the authority (role) has been revoked, so by database will contain attributes like: assigned_at, revoked_at.

How to clean Hibernate cache or Jpa Repository?

So I removed this attribute called price from my entity class.
But when running my spring-boot server, it still think its still in the table.
My application.properties is configured as such: spring.jpa.hibernate.ddl-auto=update.
I can’t use create drop because I got some data in other tables I don’t want to re enter
I’d manually delete the column and then every now and then at random runs of my application the column comes back and I’d have to manually delete again, any idea why? and how to fix.