Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

use javax.persistence annotations instead of groovyx.gaelyk.datastore ones #137

jetztgradnet opened this Issue May 30, 2012 · 6 comments


None yet
3 participants

Please use use javax.persistence annotations instead of groovyx.gaelyk.datastore ones. That way, I can reuse domain objects in other contexts and don't have to learn another set of annotations for basically the same thing.

Possible mapping from current groovyx.gaelyk.datastore annotations to javax.persistence annotations:

groovyx.gaelyk.datastore javax.persistence
@Entity @Entity
@Key @Id
@Ignore @Transient
@Version @Version (not sure if it's the same kind of version?)
@Indexed @QueryHint(name="indexed", value="true")
@Unindexed @QueryHint(name="indexed", value="false")

For a list of available javax.persistence annotations see the JEE6 javadocs

The javax.persistence annotations are available from Maven Central as javax.persistence:persistence-api:1.0.2 (see here)


musketyr commented May 31, 2012

I don't think we want to add new dependency to Gaelyk project. But in some future version we might handle these annotations as direct equivalent to each other. But what if someone would like to use standard JPA engtites and not Gaelyk entities. There must be way how to distinguish it.

Regarding additional dependencies: as GAE supports JPA, the annotations should be already available in the GAE SDK?


musketyr commented May 31, 2012

JPA is optional as well as JDO. there are no explicit dependency

see e.g.


there might be also problem with DataNucleus. it might still want to enhance the classes nevertheless it's not wanted.


glaforge commented Jun 1, 2012

Users expectations might be that any JPA entity should just work as Gaelyk entity, if we used JPA annotations.
That's what I thought doing in the first place for a moment.
But I preferred reinventing the wheel with my own annotations to avoid any confusion, and as @musketyr says, to avoid having to require the JPA dependency in WEB-INF/lib

ok, seems reasonable. Thanks for your consideration.

@glaforge glaforge closed this Jun 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment