Hi,
I am working on a new datastore provider based on NeoEmf. My entity classes are generated and I can not (can, but probably too much work) modify the generation templates in order to add JPA annotations to them. As a result, I would like to use xxx-orm.xml mappings to describe my entities.
I am trying to test this by extending the OgmTestCase (and thus using OgmTestRunner). It seems that the current implementation does not scan the test/resources folder to find persistence.xml files. As a result if I remove the hiberante.properties file and use a persistence.xml file the tests fail.
I am getting an exception:
Code:
Cannot load class org.hibernate.ogm.datastore.infinispan.impl.InfinispanEmbeddedDatastoreProvider specified via configuration property 'hibernate.ogm.datastore.provider'
Which indicates that the test is not loading my datastore provider (btw, why is infinispan the default?) . It works when using the hiberante.properties.
Is there any way I can instruct the test case to use the properties.xml file to load the database/entities configuration?
My current digging suggests that I would ahve to modify (extend) the OgmTestRunner and the ogm.utils.TestHelper in order to
change how the SessionFactory is craeted and add the orm.xml mappings programatically (using addResource). Probably by using a new annotation @TestMappings so that the test case can provide a list of mapping files that should be added to the session factory.
Thanks!