[limb-svn] r6094 - 3.x/branches/2007.3/limb/active_record

svn at limb-project.com svn at limb-project.com
Fri Jul 6 17:52:35 MSD 2007


Author: pachanga
Date: 2007-07-06 17:52:34 +0400 (Fri, 06 Jul 2007)
New Revision: 6094
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6094

Modified:
   3.x/branches/2007.3/limb/active_record/CHANGELOG
   3.x/branches/2007.3/limb/active_record/VERSION
Log:
-- preparing to 0.4.0 beta release

Modified: 3.x/branches/2007.3/limb/active_record/CHANGELOG
===================================================================
--- 3.x/branches/2007.3/limb/active_record/CHANGELOG	2007-07-06 13:46:44 UTC (rev 6093)
+++ 3.x/branches/2007.3/limb/active_record/CHANGELOG	2007-07-06 13:52:34 UTC (rev 6094)
@@ -1,6 +1,53 @@
+0.4.0-beta - 6 July 2007 (r6093)
+==================================================
+-- lmbARManyToManyCollection :: removeAll() removes only those records where 'foreigh_field' field has not NULL values. This functionality tested for mysql and sqlite db drivers.
+-- lmbActiveRecord :: import() now set related object to null if appropriate property has empty string value "" as well as "null" value
+-- experimental stuff - enabling lmbActiveRecord instances to bind to the specific db connection(AR-11)
+  * lmbActiveRecord constructor now accepts second optional argument with db connection object
+  * lmbActiveRecord :: $_db_conn stores instance db connection object
+  * static lmbActiveRecord :: setDefaultConnection($conn) sets shared db connection object which is used if no connection was passed to the constructor
+  * all static functions now accept optional argument with db connection object
+  * db connection object is propagated to all levels: to relation collections, decorators, table gateways, etc.
+-- lmbActiveRecord :: decorateRecordSet() split into 2 methods: old decorateRecordSet(..) which is left as is and new instance method _decorateRecordSet()
+-- adding phpdoc header to modules
+-- convenience lmbActiveRecord :: _addError($message, $fields = array(), $values = array()) added
+-- renaming tests to shorter equivalents: ActiveRecord => AR
+-- lmbActiveRecord :: isValid() added
+-- lmbActiveRecord :: _onValidate() is called after validator rules were processed
+-- lmbActiveRecord :: trySave($error_list) puts non lmbValidationExceptions into $error_list
+-- now it's allowed to change has_one and many_belongs_to relation fields properties directly. But if related object is a dirty property in active record then directly set relation field property will ignored.
+-- lmbActiveRecord :: resetDirty() public method added.
+-- lmbActiveRecord :: _defineRelations() relations added. This method is called in constructor.
+-- lmbActiveRecord :: _hasOne($relation_name, $info), _hasMany($relation_name, $info), _hasManyToMany($relation_name, $info), _belongsTo($relation_name, $info), _composedOf($relation_name, $info) methods added what can be used in _defineRelations() methods. This is convenient in some cases with complex inheritance
+-- lmbActiveRecord "has_one" relation now can have "nullify" property. If parent object is removed all child objects will have null is appropriate field in db table.
+-- lmbActiveRecord "belongs_to" relation now nullifies appropriate field in parent object record in db table by default. Be sure to use "can_be_null" with "true" value in relation info in parent class (has_one side of one2one relation).
+-- lmbActiveRecord :: findById(..) third argument added, $not_found_exception = true which makes this method throw lmbARNotFoundException exception if no such object was found. Setting it to false overrides this behavior and this method simply returns null.
+-- lmbActiveRecord :: find((int)$id) now doesn't throw lmbARNotFoundException exception, it simply returns null
+-- lmbActiveRecord auto create, update times support added. Now if table has 'ctime' field it's filled automatically once the object is created. If table has 'utime' field it's filled every time object is saved.
+-- adding item to lmbAROneToManyCollection sets automatically its owner
+-- when child object in one-to-many relation is saved it doesn't save already existing parent
+-- lmbActiveRecord :: _doSave() rolls back transaction if there were any exception
+-- lmbActiveRecord :: trySave() catches generic Exception not just lmbValidationException
+-- $error_list is passed to save method of relation collections
+-- lmbActiveRecord :: _onValidate() hook added, it's called right before validation
+-- lmbActiveRecord asks error list if validation was ok, not just validator, this allows to add errors separately from validation rules in, for example, new _onValidate() hook
+-- $_error_list property is setup in constructor, not lazily anymore
+-- lmbActiveRecord :: deleteRaw($class_name, $criteria=null) - it deletes records directly in database
+-- lmbActiveRecord :: update(..) => updateRaw()
+-- initial version of lmbActiveRecord :: update($class_name, $set, $criteria = null) added, it simply updates records in DB without loading objects into memory
+-- $_has_one and $_many_belongs_to relations in lmbActiveRecord do not set object as dirty if relation field did not change in _savePreRelationObject()
+-- lmbActiveRecord support much more general callbacks, these are valid examples:
+ * registerOnBeforeSaveCallback(array('Foo', 'bar'))
+ * registerOnBeforeSaveCallback(array($obj, 'bar'))
+ * registerOnBeforeSaveCallback($obj, 'bar')
+ * registerOnBeforeSaveCallback('Foo', 'bar')
+ * registerOnBeforeSaveCallback('Foo')
+-- for consistency all ActiveRecord classes(except lmbActiveRecord itself) abbreviated to AR
+-- lmbActiveRecord :: findFirstBySql(..) and its alias findOneBySql(..) added
+-- lmbActiveRecord :: getInheritanceCondition() added
+
 0.3.0-alpha - 9 April 2007 (r5569)
 ==================================================
-
 -- much more robust single table inheritance support - lmbActiveRecord encodes inheritance path in 'kind' field and uses LIKE query in order to retrieve subclasses
 -- changes due to datasource package cleanup unification(DS-1)
 -- passing lmbActiveRecord object in constructor calls import
@@ -11,7 +58,6 @@
 
 0.2.2-alpha - 1 April 2007 (r5454)
 ==================================================
-
 -- lmbActiveRecord :: findOne(..) alias for findFirst(..) added
 -- lmbActiveRecord :: find(..) now supports simpler way to specify criteria with placeholders.
    This is possible now: lmbActiveRecord :: find("Book", array('name=? and author=?', 'book', 'bob'));
@@ -19,7 +65,6 @@
 
 0.2.1-alpha - 13 March 2007 (r5232)
 ==================================================
-
 -- added lmbARRelationCollection :: getLimit(), getOffset().
 -- calling htmlspecialchars for proper encoding of html symbols in changelog, description and summary during package creation
 -- better PhpDocumentor comments
@@ -27,7 +72,6 @@
 
 0.2.0-alpha - 16 February 2007 (r5025)
 ==================================================
-
 -- lmbActiveRecord :: findBySql($class_name, $sql) added, it returns a result set of decorated with active record objects of specified $class_name
 -- lmbActiveRecord :: registerGlobal*Callback(...) static methods added, it allows to register callbacks globally
 -- new class lmbActiveRecordMetaInfo - that contains db meta info for lmbActiveRecord class. This class helps to improve performance a bit
@@ -37,10 +81,8 @@
 
 0.1.1-alpha - 14 December 2006 (r4578)
 ==================================================
-
 -- fixed: better checks for relation property dirtiness in one-to-one and one-to-many relations
 
 0.1.0-alpha - 14 December 2006 (r4537)
 ==================================================
-
 -- initial release of this package.

Modified: 3.x/branches/2007.3/limb/active_record/VERSION
===================================================================
--- 3.x/branches/2007.3/limb/active_record/VERSION	2007-07-06 13:46:44 UTC (rev 6093)
+++ 3.x/branches/2007.3/limb/active_record/VERSION	2007-07-06 13:52:34 UTC (rev 6094)
@@ -1 +1 @@
-active_record-0.3.0-alpha
+active_record-0.4.0-beta



More information about the limb-svn mailing list