1.5.x Change Log
For more information on upgrading to the latest release, please see Upgrade Instructions
Version 1.5.4
Release Date: October 21, 2009
-
Bug Fixes
- Fixed bug when using related validation rules.
-
Other Changes
- Due to the bugfix, count now accepts an array of ids to exclude from the result.
- Fixed several broken links throughout documentation.
Version 1.5.3
Release Date: September 17, 2009
-
Core Changes
- Modified the way _to_object and query processing works, significantly, by merging all query processing code into one new function (_process_query). The function _to_object is now used just to process converting a single database row into an object, and setting up that object.
-
Bug Fixes
- Fixed bug that completely broke include_required's ability to automatically add all fields.
- Fixed bugs with get_rules not being called correctly for related queries and validate->get() queries.
- Invalid relationship queries now show an error instead of silently failing.
- Fixed typo in Troubleshooting where the word 'related' was supposed to be 'required'.
-
Other Changes
- New reserved method names: _process_query and _remove_other_one_to_one (actually has been around since at least 1.5.2)
Version 1.5.2
Release Date: September 8, 2009
-
Core Changes
- By default, Datamapper ORM now adds items to the all array using a normal, indexed order. The old method was to add them to the array by their ID.
This change could easily break existing code, because the old method effectively made every query DISTINCT. To help with this, there is a new config option, all_array_uses_ids. Set this to TRUE to restore the original behavior. Using the new behavior is recommended whenever possible.
- By default, Datamapper ORM now adds items to the all array using a normal, indexed order. The old method was to add them to the array by their ID.
-
Extension Changes
- HTMLForm
- shawn (CI forum member 2309) suggested adding a new file input, which has been added.
- Fixed a bug that prevented checkboxes and radio buttons from adding square brackets ([ ]) with custom (non-object) fields.
- Custom, non-object fields can specify a default value.
- HTMLForm
-
Bug Fixes
- Changed the order of extension checking to give precedence to MY_ prefixes. Also, if the class has a “MY_” prefix, Datamapper ORM will automatically load the library it is based on.
- Fixed bugs related to saving and deleting self-relationship in-table foreign keys.
- Fixed a bug where changing a one-to-one in-table foreign key might have broken relationship integrity.
- Fixed a bug in add_table_name that was eating spaces on the field parameter.
- Fixed a bug that prevented include_related from working with deep relationships and the all fields option, found by PoetaWD.
- Fixed a typo-mistake in the _template.php model, found by BrianDHall.
Version 1.5.1
Release Date: August 27, 2009
-
Core Changes
- Global extensions will no longer override local extensions. This means an extension can be customized on a per-model basis.
-
Bug Fixes
- Fixed bugs in count and delete related to self-referencing in-table foreign keys. (Thanks mcnux!)
- Based on a suggestion from pdswan (CI forum member 53883), queries that do not include an id column will now work. There is still a plan in the future (probably 2.0) to remove the code that uses the id as for keys on the all array.
Version 1.5.0
Release Date: August 25, 2009
-
Core Changes
- Added a new update method, which allows for updating multiple objects at a time, based on ideas discussed with ben_co and Mirage.
- Added the ability to have get rules that run after the querying the database. By default this automatically converts all id columns to integers.
- Datamapper ORM now adds the table name to every field, unless that field already contains a . or (. You can prevent the table name addition by simply wrapping a field in parentheses.
- Extensions can now optionally be named with one of four prefixes: DMZ_, DataMapper_, CI_, or whatever 'subclass_prefix' is set to (usually MY_). (Thanks Mirage, for the idea!)
- Two of the included extensions (arrayutils and csvutils) have been renamed. You can continue using the old ones, or update to the new ones. The old names are no longer supported.
-
Bug Fixes
- Added code to ensure that previous queries were grouped when calling $objectA->objectB->count()
- Fixed a bug when using limits with this style query:
$object->related->limit($limit)->get()
- Fixed (probably several) bug(s) related to using $auto_populate_has_one and $auto_populate_has_many rules. These will no longer run if the current object does not exist, and any current query is saved if it does.
- Forced the return value from count to be an integer.
-
Improvements
- Added new trim rule, overriding PHP's built-in trim() function. The updated rule will not change NULL values into empty strings.
- You can now return an error message from custom validation routines, instead of just TRUE or FALSE. Returning a string will be used in place of the language-based error message. It will still be passed into sprintf with the label and rule params as arguments, so you will need to escape % characters.