Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails and Amazon SimpleDB

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?

like image 818
amra Avatar asked Jul 25 '10 21:07

amra


3 Answers

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

like image 75
rstepanenko Avatar answered Oct 29 '22 02:10

rstepanenko


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

like image 20
user531316 Avatar answered Oct 29 '22 01:10

user531316


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.

like image 1
Kerry Wright Avatar answered Oct 29 '22 02:10

Kerry Wright