My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 327: Support for mixin annotations or external persistence configuration?
4 people starred this issue and may be notified of changes. Back to list
Status:  Started
Owner:  ----

Sign in to add a comment
Reported by, Sep 20, 2011
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.
Oct 6, 2011
#1 apetresc
This would be awesome in a variety of use cases.
Nov 20, 2011
Project Member #2 scotthernandez
There is an example of this now in the test. It isn't the final impl. but is working and part of the tests.

See this commit:
Status: Started
Labels: -Type-Defect Type-Enhancement
Sign in to add a comment

Powered by Google Project Hosting