Hibernate Entitymanager Support
Teneo (release 0.8.0) can be used in combination with Hibernate Entitymanager/Annotations 3.3. All the documentation, examples and tutorials on this website also apply in case of using Teneo together with the Hibernate Entitymanager.
To use Teneo and the EJB3/JPA EntityManagerFactory (instead of the SessionFactory) you need to use a different datastore: HbEntityDataStore. Instead of using the HbHelper to create a datastore you need to directly create a HbEntityDataStore (so do: new HbEntityDataStore()). After creation you need to set its name by calling setName. After that the use of the HbEntityDataStore is the same as for the HbDataStore.
The HbEntityDataStore is a subclass of HbDataStore and adds a getEntityManagerFactory method. This means that everywhere on this site where you read HbDataStore you can also use the HbEntityDataStore.
Note: one thing we noticed is that in combination with the Hibernate Entitymanager queries did not always work correctly. For example the following query:
select ref from Library as ref where :to in elements(ref.writers)
This query did not work because Hibernate was not able to determine the type of the :to parameter. The query had to be changed to:
select ref from Library as ref, Writer as refto where refto = :to and refto in elements(ref.writers)
Although all testcases are run also for the Hibernate Entitymanager support for this has just been added. Please report any issues on the EMF newsgroup.