| limb:/3.x/trunk/limb/active_record/src/lmbARRecordSetDecorator.class.php |
Line History |
History |
latest revision Branch root:7153 annotated / raw | Diffs: previous, other | Lines: 80 ( +8, -4 ) Created: 2008-08-21 10:36:14 +0400 (4 months 16 days ago) | Author: pachanga | Changeset: 7153 Copied to: 3.x/branches/2008/limb/active_record/src/lmbARRecordSetDecorator.class.php 7280 -- adding experimental support for setting lazy fields on the fly using 'fields' attribute in find methods
7104 annotated / raw | Diffs: previous, other | Lines: 76 ( +7, -6 ) Created: 2008-07-09 18:46:44 +0400 (5 months 28 days ago) | Author: slevin | Changeset: 7104 -- used temporary variable in getting inheritance class name
7030 annotated / raw | Diffs: previous, other | Lines: 75 ( +8, -0 ) Created: 2008-05-20 11:53:33 +0400 (7 months ago) | Author: serega | Changeset: 7030 -- added lmbARRecordSetDecorator :: getIds() method.
7018 annotated / raw | Diffs: previous, other | Lines: 67 ( +14, -16 ) Created: 2008-05-15 15:53:30 +0400 (7 months ago) | Author: serega | Changeset: 7018 -- lmbActiveRecord :: __sleep() now returns all properties except _db_conn, _db_table and _db_meta_info. This allows to save a great amount of memory if active record is placed into some memory cache like memcache.-- lmbActiveRecord :: __wakeup() restores _db_conn, _db_table, and _db_meta_info for object. -- minor refactorings lmbARRecordSetDecorator
6694 annotated / raw | Diffs: previous, other | Lines: 69 ( +1, -28 ) Created: 2008-01-17 18:41:51 +0300 (11 months ago) | Author: serega | Changeset: 6694 -- lmbARQuery :: create() factory method added. lmbActiveRecord, lmbARCollection and it's children now uses lmbARQuery :: create() internally-- nesting eager fetching functionality added. e.g lmbARQuery :: create('Author')->attach('books' => array('attach' => 'categories'))->fetch() - will load all authors with books and books with categories in 3 sql queries. lmbARQuery :: create('lecture')->with('course' => array('with' => 'program')) - will load lectures with courses and courses with programs in 1 sql query (we suppose programs has many courser and courses has many lectures, lectures many belongs to courses, courses many belongs to programs) -- lmbARRecordSetJoinDecorator added to support a part of nesting eager fetching functionality
6691 annotated / raw | Diffs: previous, other | Lines: 96 ( +29, -9 ) Created: 2008-01-15 17:55:59 +0300 (11 months ago) | Author: serega | Changeset: 6691 -- major refactoring and improvements in ACTIVE_RECORD package:* new lmbARQuery class added. lmbARQuery is a child class of lmbSQLRawCriteria. lmbARQuery is created in order to implement so called eager fetching. The common usage of lmbARQuery is the following: $query = new lmbARQuery($active_record_class, $connection); $ar_objects = $query->fetch(); * lmbActiveRecord, lmbARManyToManyCollection and lmbAROneToManyCollection now uses lmbARQuery internally for fetching operations. * lmbARQuery :: with($relation_name) added that allows to eager fetch related object with one sql-query. with() support the following relation types: HAS_ONE, BELONGS_TO, MANY_BELONGS_TO. The common usage of lmbARQuery :: wiht() is the following: $query = new lmbARQuery('Person', $connection); $ar_objects = $query->with('social_security')->fetch(); Multiple with() for different relations is allowed to: $query = new lmbARQuery('Lecture', $connection); $ar_objects = $query->with('course')->with('alt_course')->fetch(); Note: at the moment lmbARQuery doesnot check uniqueness of loaded objects. That means what we can load multiple instances of the same object several times. lmbARQuery :: with() also does not set pre-fetched object is both directions, that is lectures from the last example will eagerly get courses but courses will not get any lectures. * You can also use new 'with' parameter in lmbActiveRecord :: find()-methods as well since lmbActiveRecord uses lmbARQuery internally now. * lmbARQuery :: attach($relation_name, $magic_params = array()) added that allows to eagerly fetch related object with separate sql-query. lmbARQuery :: attach() works for all types of relations (except COMPOSED_OF). lmbARQuery :: attach() does separate query for every relation. $query = lmbARQuery('Photo', $connection); $query->attach('tags', array('sort' => array('title' => 'DESC')))->attach('comments'); $photos_with_tags_and_commantes = $query->fetch(); * lmbARQuery :: attach() functionaliry is supported with new lmbARRecordSetAttachDecorator. This new class uses lmbARManyToManyCollection and lmbAROneToManyCollection internally for appropriate types of relations. This caused many refactorings in lmbARCollection and it's child classes. * Refactoring in ACTIVE_RECORD package test is also started. New lmbARBaseTestCase and lmbARTestingObjectMother classes added in order to remove code duplication.
6598 annotated / raw | Diffs: previous, other | Lines: 76 ( +76, -76 ) Created: 2007-12-07 11:01:45 +0300 (13 months ago) | Author: pachanga | Changeset: 6598 Copied to: 3.x/tags/2007.4/limb/active_record/src/lmbARRecordSetDecorator.class.php 6686 -- eol changes
6221 annotated / raw | Diffs: previous, other | Lines: 76 ( +1, -1 ) Created: 2007-08-07 11:24:35 +0400 (17 months ago) | Author: pachanga | Changeset: 6221 -- removing trailing ?> for PHP modules
5997 annotated / raw | Diffs: previous, other | Lines: 76 ( +14, -12 ) Created: 2007-06-18 16:27:21 +0400 (18 months ago) | Author: pachanga | Changeset: 5997 Copied to: 3.x/branches/2007.3/limb/active_record/src/lmbARRecordSetDecorator.class.php 6070 -- experimental commit - 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()
5945 annotated / raw | Diffs: previous, other | Lines: 74 ( +8, -2 ) Created: 2007-06-06 12:31:43 +0400 (19 months ago) | Author: pachanga | Changeset: 5945 -- adding dummy phpdoc block to each class
5942 annotated / raw | Diffs: previous, other | Lines: 68 ( +3, -6 ) Created: 2007-06-05 23:22:26 +0400 (19 months ago) | Author: pachanga | Changeset: 5942 -- "Oops, I did it again" :) Changing header once again...
5933 annotated / raw | Diffs: previous, other | Lines: 71 ( +9, -9 ) Created: 2007-06-04 17:06:23 +0400 (19 months ago) | Author: pachanga | Changeset: 5933 -- changing header: making the name more clear and making it to play nicely with phpDocumentor
5645 annotated / raw | Diffs: previous, other | Lines: 71 ( +3, -3 ) Created: 2007-04-12 11:13:10 +0400 (20 months ago) | Author: pachanga | Changeset: 5645 -- CLASSKIT, DATASOURCE packages merged into CORE-- lmbIterator => lmbCollection -- lmbComplexArray => lmbArrayHelper
5638 annotated / raw | Diffs: previous, other | Lines: 71 ( +0, -8 ) Created: 2007-04-11 18:19:36 +0400 (20 months ago) | Author: pachanga | Changeset: 5638 -- lmbARRecordSetDecorator :: getArray() removed since it's implemented in lmbIteratorDecorator
5627 annotated / raw | Diffs: previous, other | Lines: 79 ( +2, -2 ) Created: 2007-04-11 15:51:34 +0400 (20 months ago) | Author: pachanga | Changeset: 5627 -- changes due to DATASOURCE package unification
5529 annotated / raw | Diffs: previous, other | Lines: 79 ( +2, -1 ) Created: 2007-04-05 12:24:21 +0400 (21 months ago) | Author: pachanga | Changeset: 5529 -- much more robust single table inheritance support - lmbActiveRecord encodes inheritance path in 'kind' field and uses LIKE query in order to retrieve subclasses-- lmbActiveRecord :: decodeInheritancePath($path) added, it explodes inheritance path and returns an array of classes
5522 new/moved annotated / raw | Diffs: previous, other | Lines: 78 ( +78, -0 ) Created: 2007-04-03 19:38:26 +0400 (21 months ago) | Author: pachanga | Changeset: 5522 Moved from: 3.x/limb/active_record/src/lmbARRecordSetDecorator.class.php 5238 -- changing repos layout
5238 annotated / raw | Diffs: previous, other | Lines: 78 ( +9, -9 ) Created: 2007-03-14 14:09:08 +0300 (21 months ago) | Author: pachanga | Changeset: 5238 Moved to: 3.x/trunk/limb/active_record/src/lmbARRecordSetDecorator.class.php 5522 Copied to: 3.x/tags/limb3-2007.2/active_record/src/lmbARRecordSetDecorator.class.php 5496 -- lmbActiveRecord :: findOne(..) alias for findFirst(..) added-- lmbActiveRecord :: find(..) now accepts simpler way to specify criteria with placeholders, this is possible now: lmbActiveRecord :: find("Book", array('name=? and author=?', 'book', 'bob'));
4984 annotated / raw | Diffs: previous, other | Lines: 78 ( +1, -1 ) Created: 2007-02-08 18:35:02 +0300 (22 months ago) | Author: pachanga | Changeset: 4984 -- fixing @package
4942 annotated / raw | Diffs: previous, other | Lines: 78 ( +9, -9 ) Created: 2007-02-07 14:38:03 +0300 (22 months ago) | Author: pachanga | Changeset: 4942 -- fixing source files header
4881 annotated / raw | Diffs: previous, other | Lines: 78 ( +10, -9 ) Created: 2007-02-07 13:43:39 +0300 (22 months ago) | Author: pachanga | Changeset: 4881 -- changing source files header
4870 annotated / raw | Diffs: previous, other | Lines: 77 ( +4, -0 ) Created: 2007-02-06 19:02:38 +0300 (22 months ago) | Author: pachanga | Changeset: 4870 -- lmbARRecordSetDecorator :: _createObject() throws exception if no such class exists
4691 new/moved annotated / raw | Diffs: previous, other | Lines: 73 ( +73, -0 ) Created: 2006-12-17 02:16:44 +0300 (2 years ago) | Author: pachanga | Changeset: 4691 Moved from: 3.x/packages/active_record/src/lmbARRecordSetDecorator.class.php 4619 -- changing repo layout
4619 new/moved annotated / raw | Diffs: previous, other | Lines: 73 ( +73, -0 ) Created: 2006-12-17 01:15:55 +0300 (2 years ago) | Author: pachanga | Changeset: 4619 Moved from: 3.x/packages/_active_record/trunk/src/lmbARRecordSetDecorator.class.php 4583 Moved to: 3.x/limb/active_record/src/lmbARRecordSetDecorator.class.php 4691 -- changing repo layout
4583 new/moved annotated / raw | Diffs: previous, other | Lines: 73 ( +73, -0 ) Created: 2006-12-17 00:46:11 +0300 (2 years ago) | Author: pachanga | Changeset: 4583 Moved from: 3.x/packages/active_record/trunk/src/lmbARRecordSetDecorator.class.php 4466 Moved to: 3.x/packages/active_record/src/lmbARRecordSetDecorator.class.php 4619 -- changing repo layout
4466 annotated / raw | Diffs: previous, other | Lines: 73 ( +1, -1 ) Created: 2006-11-15 12:30:28 +0300 (2 years 1 month ago) | Author: pachanga | Changeset: 4466 Moved to: 3.x/packages/_active_record/trunk/src/lmbARRecordSetDecorator.class.php 4583 -- Oracle tests fixture added-- inheritance field renamed from '_class_' to 'kind' since it causes a conflict with Oracle -- lmbActiveRecord :: getInheritanceField(), setInheritanceField($name) added so it's possible to set this field name during runtime
4362 annotated / raw | Diffs: previous, other | Lines: 73 ( +1, -1 ) Created: 2006-10-27 14:01:54 +0400 (2 years 2 months ago) | Author: pachanga | Changeset: 4362 -- fixing svn:keywords
4215 annotated / raw | Diffs: previous, other | Lines: 73 ( +2, -2 ) Created: 2006-10-18 19:00:46 +0400 (2 years 2 months ago) | Author: pachanga | Changeset: 4215 -- changes due to CRE-1(removing packages support from Limb 3.x)
4124 annotated / raw | Diffs: previous, other | Lines: 73 ( +15, -4 ) Created: 2006-10-03 17:16:20 +0400 (2 years 3 months ago) | Author: pachanga | Changeset: 4124 -- initial one table inheritance schema is supported now via optional '_class_' table attribute, if it exists and object is NOT a direct inheritor from lmbActiveRecord then proper class filters are applied.-- lmbARRelationCollection :: find(...) accepts only one magical argument, which can be an array with parameters or string/object criteria -- lmbARRelationCollection :: find(...) accepts 'class' attribute in order to filter objects only of specified class
3844 annotated / raw | Diffs: previous, other | Lines: 62 ( +8, -0 ) Created: 2006-08-15 18:57:28 +0400 (2 years 4 months ago) | Author: serega | Changeset: 3844 -- init/init_tests.pgsql added. Now you can run ActiveRecord tests both for MySql and Postgres DB.-- lmbActiveRecord :: findAllRecords($criteria, $sort_params) now accepts $sort_params as second param. All other methods for data retriving is updated also. -- fixed a lot of tests in ACTIVE_RECORD package to run of Postgres DB. -- lmbARRecordSetDecorator :: getArray() returns an array of decorated objects (active records). -- lmbActiveRecord :: $_default_sort_params added.
3783 annotated / raw | Diffs: previous, other | Lines: 54 ( +10, -0 ) Created: 2006-08-01 19:40:00 +0400 (2 years 5 months ago) | Author: pachanga | Changeset: 3783 -- major refactoring of lmbActiveRecord:* one-to-many, many-to-many collection manipulations moved to lmbAROneToManyCollection, lmbARManyToManyCollection classes respectively * collections save objects on each add call if parent object is existing in db * collections don't load their whole contents into memory if object is existing in db, collection items are loaded on current() call only in this case
3751 annotated / raw | Diffs: previous, other | Lines: 44 ( +2, -1 ) Created: 2006-07-19 18:53:22 +0400 (2 years 5 months ago) | Author: pachanga | Changeset: 3751 -- misc minor refactorings of lmbActiveRecord-- basic very naive many-to-many support added, this relation should be specified with new $_has_many_to_many property, e.g.: class Group extends lmbActiveRecord { protected $_has_many_to_many = array('users' => array('field' => 'group_id', 'foreign_field' => 'user_id', 'table' => 'user2group', 'class' => 'User')); }
3739 annotated / raw | Diffs: previous, other | Lines: 43 ( +1, -1 ) Created: 2006-07-14 12:39:47 +0400 (2 years 5 months ago) | Author: pachanga | Changeset: 3739 -- lmbActiveRecord create/update empty hook methods added:* _onBeforeCreate() - called before create operation validation * _onCreate() - called right before create * _onAfterCreate() - called right after create * _onBeforeUpdate() - called before update operation validation * _onUpdate() - called right before update * _onAfterUpdate() - called right after update -- lmbActiveRecord :: _prepareSaveData() removed -- lmbActiveRecord passes itself into validator instead of lmbDataspace
3738 annotated / raw | Diffs: previous, other | Lines: 43 ( +8, -7 ) Created: 2006-07-13 13:21:00 +0400 (2 years 5 months ago) | Author: pachanga | Changeset: 3738 -- lmbARRecordSetDecorator uses class path instead of class name
3734 annotated / raw | Diffs: previous, other | Lines: 42 ( +4, -1 ) Created: 2006-07-13 11:27:02 +0400 (2 years 5 months ago) | Author: serega | Changeset: 3734 -- added a test for lmbARRecordSetDecorator
3732 new annotated / raw | Lines: 39 ( +39, -0 ) Created: 2006-07-12 18:55:00 +0400 (2 years 5 months ago) | Author: pachanga | Changeset: 3732 -- commit due to new lmbObject property container behavior-- experimental lmbARRecordSetDecorator class added, it's used for substitution of records with first class AR objects on demand -- lmbActiveRecord :: getDataset($criteria = null) - now accepting $criteria and returning recordset wrapped in lmbARRecordSetDecorator -- internal lmbActiveRecord :: _decorateRecordSet($rs, $class=null) added, this method wraps recordset with lmbARRecordSetDecorator
|