开发者

Grails and Amazon SimpleDB

开发者 https://www.devze.com 2023-01-09 07:18 出处:网络
How to setup Grails project to use Amazon SimpleDB? One possibility is to install gorm-jpa plugin and use SimpleJPA library, but I couldn\'t开发者_运维问答 setup it correctly.

How to setup Grails project to use Amazon SimpleDB?

One possibility is to install gorm-jpa plugin and use SimpleJPA library, but I couldn't开发者_运维问答 setup it correctly.

Has someone experience with this combination?


Try simpledb GORM plugin for grails: http://grails.org/plugin/simpledb


after many trials and errors i am managed to use simple jpa project from grails web application

I have used it :

using EntityManagerFactory and the JPA provider APIs

writing few service artifacts was able to use to simple bd features seamlessly


It can be done with the gorm-jpa plugin and simplejpa, but there are a lot of conflicts between the limitations in gorm-jpa and simplejpa (in addition to those on that page, simplejpa currently only supports named parameters not positional parameters, which GORM requires). I've found it much better to just use simplejpa and inject the entityManager directly into objects that need it. Also keep in mind that there are some limitations to SimpleJPA's support for groovy: it supports JPA annotations on grails domain class attributes, but you have to annotate a getter for ManyToOne and OneToMany relationships.


The current release of the GORM SimpleDB plugin (0.5) is a bit dated and doesn't work with the current release of GORM (2.0.7) used in Grails.

You can make it work, but it requires a little bit of effort. See http://twasink.net/2014/01/29/how-to-grails-gorm-and-simpledb/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号