"A no operation implementation of BeanPersistController. Objects extending this need to only override the methods they want to."
"A BeanPersistAdapter is either found automatically via class path search or can be added programmatically via ServerConfig.add(BeanPersistController)
orServerConfig.setPersistControllers(java.util.List)
."
But I can't make it work with Play. The controller won't get registered by himself, and I don't know how to retrieve the ServerConfig instance to add them manualy. For information i have a Document and DocumentController in the same package (models)
So eg. you would need to change it to:
ebean.default="models.*,models.adapters.OrderPersistAdapter"
Play checks for those classes matching the wildcard that have the
annotations @Entity or @Embeddable. If you think about it, that
actually makes a lot of sense, because you can't be guaranteed that
everything in your models package is going to be an ebean class.
PersistAdapter and some others don't have annotations, so it's a small
price to pay imho.
Yes, that threw me too when I first went through that.
> To avoid putting every adapter in the application.conf, wich could lead to
> many prolems, i've found this adapter :
> http://dominikdorn.com/2012/01/jpa-entity-listener-annotations-avaje-ebean/
That's pretty cool. Thanks for the link!
> many prolems, i've found this adapter :
> http://dominikdorn.com/2012/01/jpa-entity-listener-annotations-avaje-ebean/That's pretty cool. Thanks for the link!