Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've used Morphia in a production environment and it's fairly easy to include if you have a maven based build. Just add this snippet to your build it you want:</p> <p><a href="http://code.google.com/p/morphia/wiki/Dependencies#Through_Maven" rel="nofollow">http://code.google.com/p/morphia/wiki/Dependencies#Through_Maven</a></p> <p>However having used it I would say that if I could do it again then I would either use Spring Data (which supports Mongo) or work directly with the native Mongo Driver using a good basic DAO pattern.</p> <p>My reasons are as follows: 1) Morphia is not as actively developed as it was before. 2) An O/R mapper is great in the beginning but you will run into lots of new features that you wish you had. For example a common practice is as your data model changes you would like to upgrade old rows whenever you read them with a new field. This is quite simple using native driver but not so much once you abstract it. 3) Morphia also has a known issue (maybe design decision) where it pulls ref collections along with the main parent. In the case of a User object that owns a Mailbox for example it pulls all his messages and caused lots of performance issues. You can get around this with a lazy loading pattern but again more trouble in the long run.</p> <p>My recommendations: 1) If you must use an O/R mapper and you're already on spring why not go with spring data which has a larger developer community (and a big company) around it. 2) If you are building a larger project go with the native driver.</p> <p>For smaller projects Morphia is still a good choice and does bring good developer productivity gains. Just bear in mind it's drawbacks.</p> <p>Hope that helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload