Tynamo, JPA & GAE
Today I was playing with Tynamo & JPA and I found two things that I would like to share.
1) I wanted to check what was the simplest jpa configuration possible and I wanted to see how difficult is to migrate from tapestry-model-hibernate to tapestry-model-jpa using that configuration. It turns out that's really really easy.- Change your dependency from tapestry-model-hibernate to tapestry-model-jpa
- Add hibernate-entitymanager as a dependency (don't forget to exclude slf4j-api)
- Then configure your persistence.xml using org.hibernate.ejb.HibernatePersistence as a provider. You can even copy the properties from your hibernate.cfg.xml
- Configure your persistence unit: configuration.add(JPASymbols.PERSISTENCE_UNIT, "nameOfPersistenceUnit");
THAT'S IT!!
More info: http://tynamo.org/tapestry-jpa+guide
Anyway, I'm not giving up on GAE, so next step: tapestry-model-objectify !
