Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for mixin annotations or external persistence configuration? [moved] #327

Closed
jyemin opened this issue Apr 25, 2013 · 1 comment
Closed

Comments

@jyemin
Copy link
Contributor

jyemin commented Apr 25, 2013

This is Issue 327 moved from a Google Code project.
Added by 2011-09-20T16:21:25.000Z by thegreen...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Low

Original description

It would be nice if Morphia supported "mixin" annotations akin to the ones found in Jackson.

ie., given a domain object:

class Obj {
  int oid;
  double[] vals;
}

That I want to persist via Morphia & Mongo, but don't want to add annotations to the class. So I want to be able to define the annotations/persistence information outside of that class in something like:

@Entity class ObjMixin {
  @Id int oid;
  double[] vals;
}

And then somewhere in the mapping code do something like:

datastore.mapWith(Obj.class, ObjMixin.class)

Mapping in JSON or XML would also work.
@evanchooly
Copy link
Member

gone away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants