Is there a way to load only selected entities with Hibernate?
I would like to only load a selected handful for integration testing.
Is there a way to load only selected entities with Hibernate?
I would like to only load a selected handful for integration testing.
I create an AnnotationConfiguration
programatically for this kind of tests and use methods such as addAnnotatedClass(Class)
to "enlist" entities.
I ended up using a custom persistence.xml and gave it to the EntityManagerFactory in the spring config.