04 Aug 2017, 10:10

MongoDB POJO Support

I’m really pleased to announce that version 3.5.0 of the MongoDB Java Driver has been released with POJO (Plain Old Java Object) support!

Codecs

MongoDB uses BSON, a binary super set of JSON, for its wire protocol and storage format. The 3.0 series of the Mongo Java Driver introduced Codecs - an improved way of translating these BSON into the native Java objects eg: Document or BsonDocument.

Codecs are an abstraction that determine how BSON data is converted and into what type. As an abstraction, it can be quite verbose to write your own custom POJO Codecs. As each POJO requires a Codec implementation to be registered in the CodecRegistry. The amount of code required to support an application with tens of POJOs was often seen as a barrier to entry.

However, the benefits of using Codecs for handling your POJOs were numerous. It could easily simplify your main application code, as POJOs can map directly to the domain, making the code easier to reason. Another benefit is speed, Codecs can negate the need to use an intermediate map-like object before hyrdating your domain object. For this reason, it has been a long requested feature to make the creation of Codecs from POJOs automatic.

PojoCodecProvider

20 May 2013, 00:00

mongoengine 0.8.0

I’m really pleased to annouce the release of MongoEngine 0.8.0. Its been a long process due to work and life commitments but the latest version of MongoEngine is here.

Whats changed?

There have been loads of fixes, improvements and changes in 0.8. The headliners are:

  • Minimum requirements are python 2.6+ and pymongo 2.5+
  • Inheritance now off by default
  • Inherited documents store _cls not _types (preventing auto creation of multikey indexes)
  • Querysets are immutable and now return clones
  • New Geo Fields supporting mongodb 2.4 new “2dSphere” indexes
  • New context managers for switching collections or databases on the fly as well as turning off dereferencing
  • Django support improved (now supports Django 1.5.1, groups and permissions)
  • Performance improvements, back to the same performance as 0.4

And much, much more!

01 May 2013, 00:00

MongoEngine 0.8 RC1 Released

Notice: 0.8.0RC3 has been released fixing a couple of small bugs and extra improvements.

Notice: 0.8.0RC2 has been released fixing an obscure queryset cursor cloning issue.

I’m really pleased to annouce the release candidate for MongoEngine 0.8! Its been a long process due to work and life commitments but the latest version of MongoEngine is ready for testing and feedback.

Why a release candidate?

There have been massive changes in the internals, requiring thought and testing before upgrading and releasing to the wild - so please read the upgrade docs carefully!

The changes are worth it and make using MongoEngine even better.

Please test 0.8.0RC1 on your test systems and staging systems and any feedback please email the user group or if you’d prefer to message me directly you can via https://github.com/rozza

Whats changed?

There have been loads of fixes, improvements and changes in 0.8. The headliners are: