Skip to content

New entities are not correctly registered when using Spring #634

@Artur-

Description

@Artur-

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions