objectory 0.5.5

  • README.md
  • Installing
  • Versions
  • 0

##Objectory - object document mapper for server-side and client side Dart applications ##Update: Please consider that library as unsuppoprted and not in active developement. Current updates (>0.3.22 published to pub) are mostly suited for usage in concrete scenario of internal project.

Objectory provides typed, checked environment to model, save and query data persisted on MongoDb.

Objectory provides identical API for server side and browser applications (both Dartium and dart2js supported).

Build Status ###Getting started

Now you may run server-side blog example: /example/console/blog_console.dart. This example uses connection to free MongoLab account

  • Install MongoDb locally. Ensure that MongoDB is running with default parameters (host, port 27017, authentication disabled)

Now you may run server side objectory tests: test/base_objectory_tests.dart and test/vm_implementation_tests.dart

  • While running local MongoDB process, start websocket objectory server: bin/objectory_server.dart

  • Configure Dartium launches for test/objectory_test.html and /example/blog.html In group Dartium settings uncheck Run in checked mode and Enable debugging.

Now you may run browser tests and blog example (port of server-side example to browser) both in Dartium and as JavaScript. JavaScript launches do not require any special setup.

See Quick tour and API documentation for futher information

See also Sample full stack application with

  • Angular.dart as primary framework
  • MongoDb as backend DB
  • Objectory as object/document mapper
  • Rikulo Stream Web server to serve static content and as a container for Objectory WebSocket handler.

#Recent change notes


  • Loosing type annotation - _id field can be something another then ObjectId. Use assertions for consistent usage of one type for _id fields across objectory application.
  • Objectory cache separated by collections
  • Objectory cache made private, added public methods clearCache(Type classType) and addToCache(PersistentObject obj)


  • DbRefs removed. Pointers to linked objects use Manual pointers (plain ObjecId). That now works only for simplest case (ObjectId in property of top level object). List of pointers, pointers inside of embedded objects, and inside list of embedded objects are broken for now. To support it new schema properties should be auto-generated


  • Property descriptors in autogenerated Schema classes. Label attribute


  • Several backward incompatible things (To be described)


  • Remove export directive for external dependenvies (bson and dart:async)


  • Domain model autogeneration from simple proto-model (models are backward compatible)
  • Autogeneration of helper schema classes, for safe fields choosing for find and findOne queries
  • Examples and test adopted for new features


  • Fix for issue 65. Added test testPersistentListWithEmbeddedObjects


  • BugFix in ObjectoryServerImpl, objectory server port changed in samples and tests to avoid conflict with pub serve


  • Update core dependencies to 0.10.0 and up


  • bugfix in ObjectoryServerImpl. Addressed issue 64


  • get method added to objectory collection
  • Objectory addToCache method made private
  • Quick tour somewhat updated
  • Changelog moved to root in accordance with pub site preferences
  • some refactoring in objectory initialization
  • fetch method of PersistentObject returns future of itself now
  • previously deprecated method dbType on PersistenObject removed
  • isFetched getter added to PersistentObject (false for shallow proxy)


  • Bug fix: PersistentObject map setter was setting id to null
  • Name change: Objectory datamapDecorator renamed to dataMapDecorator
  • dataListDecorator added to Objectory
  • Package prepared to Dart 1.0


  • Upgrade for Dart SDK version Gwt_Contacts sample is broken, waiting for fix in original dart-polyhmer-dart-examples


  • Port of polymer GwtContacts sample added
  • Bugfix to PersistentObject save method
  • Many minor changes
  • dbType deprecated, use collectionName instead.


  • Added datamapDecorator property to Objectory, so PersistentObject's data map may be substituted by arbitrary map-like object upon creation. For example Web-UI application may configure Objectory to make PersistenObject observable by: objectory.datamapDecorator = (Map map)=>toObservable(map);


  • Bugfix and test for situation when save operation on PersistentObject without dirty fields (should be no-op) actually set all its properties to null



  • Objectory now use field level updates (update with $set operator) by default. This shoud greatly reduses problems with concurrent updates. Old mode can be toggled by attribute useFieldLevelUpdate


-Small changes in query builder. Better error handling in open connection (pull requests from kaisellgren and izaera respectively)


  • Small changes, bugfixes in query builder


  • Bugfix for remove operation in objectory_server (was not implemented)


  • Upgrade for bson 0.1.5. json_ext dependenvy removed.


  • Query API supports AND and OR operators


  • Bugfix in WebSocket VM implementation.


  • Modelling API revamped. Classes in modelling designated by Type not by string names.
  • Querying API revamped, more closely followed to mongo_db and mongo_dart patterns.


  • PersistentObject got getPersistentList method as preferred way to define List properties in models.


  • match in QueryBuilder go named instead of positional parameters
  • where in QueryBuilder deprecated in favour of jsQuery
  • range in QueryBuilder deprecated in favour of inRange
  • test for match added
  • test for jsQuery added


  • Client/Server communication moved from JsonExt to Bson (using new cross-platform version of bson)
  • Bugfix on browser side - findOne still was using cache.


  • Change in dependencies - bson library separated from within mongo_dart


  • Upgrade to Dart SDK version
  • find() and findOne() always get objects from Db (If objects exists in cache they are replaced by fresh ones from Db)


  • PersistentList inherit from ListBase. No more notimplemented methods and type warnings.


  • Upgrade for Dart SDK version (post M4)


  • Count() method implemented on all platforms


  • Upgrade for M4 changes
  • Obectory server now does not log messages my default, verbosity switched by command line parameter --verbose


  • Bugfixes for PersistentObject methods: contains, indexIf, lastIndexOf
  • save and remove methods returns Future (consistently with Objectory save and return)
  • supported Dart SDK version


  • Support of dart:io version 2. (Stream-based).
  • fetchLinks method of QueryBuilder (With it PersistentObjects in resultset of findOne and find prefetch linked objects)



  • Support for limit and skip operation in QueryBuilder.


  • Ready for M3, run in version 0.3.1_r17328


  • dart.js bootstrap file is moving to pub


  • Minor fixes
  • Cleared all warnings from DartEditor
  • Pubspec refers to dart_mongo from pub.dartlang.org
  • Local_objectory_tests broken due to lawndart errors.


  • minor fixes
  • sdk dependencies changed to pub.dartlang.org


  • Changes reflecting dart lib changes - methods to getters, such as Map.getKeys() and so on

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  objectory: ^0.5.5

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:objectory/objectory.dart';
Version Uploaded Documentation Archive
0.5.5 Oct 1, 2016 Go to the documentation of objectory 0.5.5 Download objectory 0.5.5 archive
0.3.22 Dec 10, 2014 Go to the documentation of objectory 0.3.22 Download objectory 0.3.22 archive
0.3.21 Jun 22, 2014 Go to the documentation of objectory 0.3.21 Download objectory 0.3.21 archive
0.3.20 Jun 19, 2014 Go to the documentation of objectory 0.3.20 Download objectory 0.3.20 archive
0.3.19 Jun 11, 2014 Go to the documentation of objectory 0.3.19 Download objectory 0.3.19 archive
0.3.18 May 2, 2014 Go to the documentation of objectory 0.3.18 Download objectory 0.3.18 archive
0.3.16 May 2, 2014 Go to the documentation of objectory 0.3.16 Download objectory 0.3.16 archive
0.3.15 Jan 18, 2014 Go to the documentation of objectory 0.3.15 Download objectory 0.3.15 archive
0.3.14 Nov 9, 2013 Go to the documentation of objectory 0.3.14 Download objectory 0.3.14 archive
0.3.13 Nov 2, 2013 Go to the documentation of objectory 0.3.13 Download objectory 0.3.13 archive

All 40 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.10.0 <2.0.0