Morphia 1.6.0 and 2.0.0 have been released

I am beyond thrilled to announce the release of not one but two new versions of Morphia. We’ll start off with the 1.6.0 release. Release notes can be found here. This release has two main goals:

  1. To provide support for the 4.x driver series on the legacy API
  2. To provide a migration path for 2.0 via a set of deprecations.

The deprecation coverage isn’t complete and there are a few changes you’ll want to make after migrating to 2.0 but if you clean up all the deprecations you can on 1.6, it should compile just fine on 2.0. Then you’ll just want to complete the job of cleaning up the deprecations.

The bigger news is that 2.0.0 has officially been released. You can find those release notes here. I won’t go in to all the details here because I’ve written a blog with the history of the release for those interested and a breakdown of the updates. This release represents almost 3 years of work (woven between other responsibilities and releases) and hundreds if not thousands of hours of work. I do hope you’ll check it out. It’s the foundation for many great things I have planned.

As always if you run in problems or questions with either release, please don’t hesitate to file an issue and we’ll try to work things out together. A big thank you to everyone who’s provided feedback so far.

Take care.

1 Like

Hi Justin,

Glad to know about this update. I was unsure about the future of Morphia when I got to know it went out of official mongodb umbrella. But now I hope this continues and remain as the best ODM option for Java.

We’re using Morphia in production (currently it is v1.3.2). Our database is hosted on Atlas cloud and I would like to continue using the mongodb along with the Morphia.

Can you help me understand how shall I proceed to get my project smoothly updated with latest Morphia - from 1.3.2 to 1.6.0 (or 2.0.0)? If you’re aware about any resources regarding upgrades, please share me in reply. Thanks.

Thanks and best regards,
Pawan

The upgrade to 1.4 is a simple package upgrade. Before you make the leap to 2.0, I would recommend upgrading to 1.6 first. This should be a drop in replacement and you can continue on 1.6 as long as you’d like. There are a number of deprecations in 1.6 to help you prepare for the 2.0 upgrade. Some of those deprecations do not have replacements in 1.6 due to various reasons but many do. Once you eliminate the deprecations you can, upgrading to 2.0 should be seamless as well. Once on 2.0, you can eliminate the remainder of those deprecations by migrating to the new APIs at your own pace. The 2.0 update is worth it (yes, I’m biased) as the API is leaner and more consistent. The formal migration guide hasn’t yet made it in to the docs but i’m working on that now. There’s a skeleton guide in the github repository, however.

If you run in to upgrade issues, please file an issue at on github and I’ll do my best to get you sorted.

2 Likes