DataMapper ORM 1.8.1
Download the Latest Version Here
View the change log and the upgrade process
Having issues? Please look through the Troubleshooting Guide & FAQs
View the Complete Manual
Search the Manual
(Due to the server’s caching configuration, you may need to forcibly refresh your browser to see the changes in the manual.)
DataMapper (DM) is an Object-Relational Mapper that builds on ActiveRecord. Data is loaded from database tables into objects, and relationships can be managed through simple, easy-to-read functions.
To install DataMapper ORM, the (fairly simple) upgrade process is described here.
DataMapper offers these features:
• Everything is an object!
• Easy to setup, easy to use.
• Custom Validation on object properties.
• Lazy Loading (related objects are only loaded upon access).
• Relations and their integrity are automatically managed for you.
• One to One, One to Many, and Many to Many relations fully supported.
• Select data in the style of Active Record (with or without Method Chaining).
You can learn much more from the manual.
* New Features
o Alternative model locations are supported through the model_path advanced relationship parameter, or through the add_model_path static method.
o Added new truncate method to delete all records, and relations to those records.
o You can now pass a string as parameter to the to_array() and all_to_array() methods of the array extension, if you want to select only a single field.
o You can now run include_related on ‘many’ relations, see the docs for an explaination.
o Added new force_validation() method to force revalidation when you read a record from the database that would not pass the save rules.
o A new configuration value cascade_delete determines if delete operations need to cascade. See here.
o Added support for the new CI reactor versions, in which Lang and Loader library properties are no longer public.
o Added new where_between() methods to support “WHERE field BETWEEN a AND b” type queries.
o The json extension now supports related objects, which will be exported as nested objects (‘id’ fields only).
* Bug Fixes
o Added support for a database prefix when specifying a join table (‘database.tablename’).
o Extensions now receive the object that loads then as second parameter of the constructor, as documented.
o Do not unnecessarily join tables in a many to many relationship when defining a where clause on the related ‘id’ field.
o Fixed broken subqueries.
o Fixed broken like() queries: missing trailing space and no automatic escaping.
o Fixed nestedsets extension methods for moving sibling and child objects.
o Fixed language error messages in the log due to undefined validation labels when using CI Reactor or CI 2.0.2.
o Fixed incorrect SQL generated when using where() with a multi-value array just after a group_start().
o Fixed broken query caching when using group_start().
* Other Changes
o Datamapper now checks if the CodeIgniter database library is loaded when the Datamapper class is instantiated, and exits with an error message if not.
o The functionality of reciprocal self relationships is more clearly documented.
Make sure to check out the changelog — you won’t want to skip this update!
Bug reports and feature requests:
Please use the issue register / bug tracker on bitbucket to report new bugs or for new feature requests. If you do, please include in your description is link to the thread on this forum discussing the issue (if possible), so I have a link between the two and can keep track of all issues.
Thanks goes to Overzealous, for all he has achieved with DMZ. And to stensi, for providing such an amazing code base to work on.