Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New entities are not correctly registered when using Spring #634

Open
Artur- opened this issue Jan 22, 2025 · 0 comments
Open

New entities are not correctly registered when using Spring #634

Artur- opened this issue Jan 22, 2025 · 0 comments
Labels

Comments

@Artur-
Copy link
Contributor

Artur- commented Jan 22, 2025

Test case: https://github.com/Artur-/spring-jpa-test

After launching DemoApplication and opening http://localhost:8080 you should see

EntityManager knows about these entities: [Entity1]

After copying Entity1.java to Entity2.java and replacing all 1s with 2s` in the file, you should be able to reload the page and see

EntityManager knows about these entities: [Entity1, Entity2]

However, you will still see

EntityManager knows about these entities: [Entity1]

even though HotswapAgent outputs

HOTSWAP AGENT: 11:04:43.913 RELOAD (org.hotswap.agent.plugin.hibernate_jakarta.HibernateRefreshCommands) - Hibernate EntityMangerFactory configuration refreshed.

Side note: If you use JRebel, then it works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants