| limb:/3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php |
Line History |
History |
latest revision Branch root:7271 annotated / raw | Diffs: previous, other | Lines: 2281 ( +1, -1 ) Created: 2008-12-03 22:59:30 +0300 (34 days ago) | Author: idler | Changeset: 7271 Copied to: 3.x/branches/2008/limb/active_record/src/lmbActiveRecord.class.php 7280 -- start to preparing Limb for php-5.3 :-- define all methods in lmbTestGetopt as static -- remove deprecated construction &new Class() in mock_objects (simpletest) -- remove passing by reference in TestSuite & ReferenceExpectation (simpletest) -- change method __call from protected to public in lmbActiveRecod,lmbToolkit,lmbObject
7204 annotated / raw | Diffs: previous, other | Lines: 2281 ( +9, -4 ) Created: 2008-11-07 09:13:16 +0300 (2 months ago) | Author: pachanga | Changeset: 7204 -- adding experimental support for lazy fields while finding stuff in relations
7161 annotated / raw | Diffs: previous, other | Lines: 2276 ( +29, -3 ) Created: 2008-08-27 11:38:33 +0400 (4 months 11 days ago) | Author: serega | Changeset: 7161 -- now lmbActiveRecord only saves dirty fields. although can be some bugs with value objects.
7159 annotated / raw | Diffs: previous, other | Lines: 2250 ( +5, -6 ) Created: 2008-08-23 01:42:14 +0400 (4 months 15 days ago) | Author: pachanga | Changeset: 7159 -- getting rid of unneccessary static calls, replacing them with instance methods
7153 annotated / raw | Diffs: previous, other | Lines: 2251 ( +35, -7 ) Created: 2008-08-21 10:36:14 +0400 (4 months 17 days ago) | Author: pachanga | Changeset: 7153 -- adding experimental support for setting lazy fields on the fly using 'fields' attribute in find methods
7124 annotated / raw | Diffs: previous, other | Lines: 2223 ( +1, -1 ) Created: 2008-07-19 01:02:24 +0400 (5 months 19 days ago) | Author: pachanga | Changeset: 7124 -- minor comments changes
7123 annotated / raw | Diffs: previous, other | Lines: 2223 ( +8, -2 ) Created: 2008-07-18 18:35:41 +0400 (5 months 19 days ago) | Author: conf | Changeset: 7123 -- now AR property (table fields only) marks dirty only if it really changed its value-- added test
7104 annotated / raw | Diffs: previous, other | Lines: 2217 ( +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
7095 annotated / raw | Diffs: previous, other | Lines: 2216 ( +8, -1 ) Created: 2008-07-07 09:38:40 +0400 (6 months ago) | Author: pachanga | Changeset: 7095 -- postponing _savePreRelations() as much as possible in case of the new object
7094 annotated / raw | Diffs: previous, other | Lines: 2209 ( +2, -2 ) Created: 2008-07-06 22:56:52 +0400 (6 months ago) | Author: pachanga | Changeset: 7094 -- _onBeforeSave() hook is now called really first
7059 annotated / raw | Diffs: previous, other | Lines: 2209 ( +12, -0 ) Created: 2008-06-09 16:28:30 +0400 (6 months ago) | Author: serega | Changeset: 7059 -- $has_one and $many_belongs_to relations now supports 'throw_exception_on_not_found' relation definition flag. If this flag is used and object can't be loaded (it was removed from database and relation field were not update) then active record will not raise an exception.
7047 annotated / raw | Diffs: previous, other | Lines: 2197 ( +1, -1 ) Created: 2008-05-30 13:18:09 +0400 (7 months ago) | Author: pachanga | Changeset: 7047 -- minor code style fix
7045 annotated / raw | Diffs: previous, other | Lines: 2197 ( +14, -1 ) Created: 2008-05-27 13:23:02 +0400 (7 months ago) | Author: serega | Changeset: 7045 -- reverted back __sleep() and __wakeup() methods since objects take mush more space in cache with new implementation
7044 annotated / raw | Diffs: previous, other | Lines: 2184 ( +2, -2 ) Created: 2008-05-27 11:55:49 +0400 (7 months ago) | Author: alex433 | Changeset: 7044 -- Adding declaration lmbActiveRecord :: _getCallingClass() method as static
7040 annotated / raw | Diffs: previous, other | Lines: 2184 ( +10, -10 ) Created: 2008-05-23 12:44:46 +0400 (7 months ago) | Author: alex433 | Changeset: 7040 -- Adding declaration lmbActiveRecord :: registerGlobalOn..() methods as static
7035 annotated / raw | Diffs: previous, other | Lines: 2184 ( +7, -20 ) Created: 2008-05-22 08:03:41 +0400 (7 months ago) | Author: vasiatka | Changeset: 7035 -- Changed __wakeup method of active_record-- deleted __sleep method of active_record
7030 annotated / raw | Diffs: previous, other | Lines: 2197 ( +1, -1 ) Created: 2008-05-20 11:53:33 +0400 (7 months ago) | Author: serega | Changeset: 7030 -- added lmbARRecordSetDecorator :: getIds() method.
7019 annotated / raw | Diffs: previous, other | Lines: 2197 ( +9, -3 ) Created: 2008-05-15 16:18:46 +0400 (7 months ago) | Author: serega | Changeset: 7019 -- lmbActiveRecord :: $_db_conn_dsn property added that is filled in constructor. This property is used by __wakeup() method to restore the same connection as was before serialiazation.
7018 annotated / raw | Diffs: previous, other | Lines: 2191 ( +22, -0 ) 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
6847 annotated / raw | Diffs: previous, other | Lines: 2169 ( +3, -3 ) Created: 2008-03-21 13:41:38 +0300 (9 months ago) | Author: svk | Changeset: 6847 -- correct identifiers quoting
6844 annotated / raw | Diffs: previous, other | Lines: 2169 ( +1, -1 ) Created: 2008-03-18 20:10:33 +0300 (9 months ago) | Author: pachanga | Changeset: 6844 -- using indentity comparison with LIMB_UNDEFINED constant
6842 annotated / raw | Diffs: previous, other | Lines: 2169 ( +1, -1 ) Created: 2008-03-18 14:19:03 +0300 (9 months ago) | Author: svk | Changeset: 6842 -- strange E_NOTICE fixed
6839 annotated / raw | Diffs: previous, other | Lines: 2169 ( +1, -1 ) Created: 2008-03-15 11:57:44 +0300 (9 months ago) | Author: svk | Changeset: 6839 -- ActiveRecord::getInheritanceCondition fixed-- ActiveRecord tests fixed (reconnect for pgsql) -- isValid() method added to lmbPgsqlConnection
6811 annotated / raw | Diffs: previous, other | Lines: 2169 ( +6, -0 ) Created: 2008-02-27 16:05:08 +0300 (10 months ago) | Author: serega | Changeset: 6811 -- internal flag $_is_being_saved is reset if validation failed
6808 annotated / raw | Diffs: previous, other | Lines: 2163 ( +2, -2 ) Created: 2008-02-27 14:43:56 +0300 (10 months ago) | Author: serega | Changeset: 6808 -- passing current db connection to custom relation object in lmbActiveRecord
6756 annotated / raw | Diffs: previous, other | Lines: 2163 ( +12, -11 ) Created: 2008-01-29 11:30:51 +0300 (11 months ago) | Author: korchasa | Changeset: 6756 -- replace lmbActiveRecord with array
6751 annotated / raw | Diffs: previous, other | Lines: 2162 ( +1, -1 ) Created: 2008-01-25 16:38:49 +0300 (11 months ago) | Author: korchasa | Changeset: 6751 -- remove useless typecasting
6694 annotated / raw | Diffs: previous, other | Lines: 2162 ( +4, -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: 2186 ( +67, -18 ) 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.
6617 annotated / raw | Diffs: previous, other | Lines: 2137 ( +21, -8 ) Created: 2007-12-18 18:55:56 +0300 (12 months ago) | Author: pachanga | Changeset: 6617 Copied to: 3.x/tags/2007.4/limb/active_record/src/lmbActiveRecord.class.php 6686 -- adding exeperimental support for specifying different than 'id' name of the primary key
6595 annotated / raw | Diffs: previous, other | Lines: 2124 ( +3, -3 ) Created: 2007-12-06 23:10:05 +0300 (13 months ago) | Author: pachanga | Changeset: 6595 -- introducing LIMB_UNDEFINED universal constant which can be used for any 'undefined' values-- fixing oci, sqlite, pgsl records in order to comply new get interface
6583 annotated / raw | Diffs: previous, other | Lines: 2124 ( +12, -6 ) Created: 2007-12-05 15:43:47 +0300 (13 months ago) | Author: korchasa | Changeset: 6583 new feature: default value in get method in objects implement SetInterfaceget method return default value, when property not found in set example: $object = new lmbObject(); $object->get('foo', 'bar') //returns 'bar' Feature will be helpfull(i hope) in lmbActiveRecord to get NullObjects: class LessonForTest extends lmbActiveRecord { protected $_composed_of = array('not_required_date' => array('field' => 'date_end', 'class' => 'TestingValueObject', 'getter' => 'getValue', 'can_be_null' => true)); } class NotRequiredDateNullObject {} $lesson = new LessonForTest(); $lesson->get('not_required_date', new NotRequiredDateNullObject()); //returns object of class 'NotRequiredDateNullObject';
6541 annotated / raw | Diffs: previous, other | Lines: 2118 ( +1, -1 ) Created: 2007-11-23 10:19:13 +0300 (13 months ago) | Author: serega | Changeset: 6541 -- minor fix in exception message
6538 annotated / raw | Diffs: previous, other | Lines: 2118 ( +12, -4 ) Created: 2007-11-22 12:46:10 +0300 (13 months ago) | Author: wiliam | Changeset: 6538 -- lmbActiveRecord :: getComposedOfRelationsInfo added;
6436 annotated / raw | Diffs: previous, other | Lines: 2110 ( +1, -1 ) Created: 2007-10-18 11:44:39 +0400 (14 months ago) | Author: korchasa | Changeset: 6436 small fix for 'can_be_null' condition realisation
6435 annotated / raw | Diffs: previous, other | Lines: 2110 ( +1, -1 ) Created: 2007-10-18 11:42:40 +0400 (14 months ago) | Author: korchasa | Changeset: 6435 -- change 'required' property in valueObject definition to 'can_be_null'
6432 annotated / raw | Diffs: previous, other | Lines: 2110 ( +1, -1 ) Created: 2007-10-17 16:09:01 +0400 (14 months ago) | Author: korchasa | Changeset: 6432 -- added support flag 'required'. If valueObject has in definition required=false, then the meaning of the blank or null field, valueObject will not be built
6431 annotated / raw | Diffs: previous, other | Lines: 2110 ( +13, -1 ) Created: 2007-10-17 10:45:49 +0400 (14 months ago) | Author: korchasa | Changeset: 6431 is_required
6423 annotated / raw | Diffs: previous, other | Lines: 2098 ( +95, -71 ) Created: 2007-10-16 11:49:09 +0400 (14 months ago) | Author: serega | Changeset: 6423 -- lmbActiveRecord refactoring due to recent lmbObject changes:* lmbActiveRecord :: has() now properly works for all db fields and relations and always returns true if such db field or relation exists. * lmbActiveRecord :: $_raw_value_objects() removed for simpler design. * lmbActiveRecord :: _setDbValue() removed. lmbObject :: _setRaw() used instead. * Note what lmbActiveRecord also throws exceptions from get('no_such_property') and getNoSuchProperty() as well as lmbObject does
6316 annotated / raw | Diffs: previous, other | Lines: 2074 ( +2074, -2043 ) Created: 2007-09-19 21:51:10 +0400 (15 months ago) | Author: pachanga | Changeset: 6316 -- adding experimental support for short alternatives of static update*,delete* calls
6315 annotated / raw | Diffs: previous, other | Lines: 2043 ( +93, -7 ) Created: 2007-09-19 15:35:40 +0400 (15 months ago) | Author: pachanga | Changeset: 6315 -- adding experimental and quite hacky ability to omit class name in find* methods, thus Foo :: find\(\) is possible instead of lmbActiveRecord :: find\(Foo\). Anyway once we have LSB patch in PHP lmbActiveRecord will have all the required infrastructure
6298 annotated / raw | Diffs: previous, other | Lines: 1957 ( +19, -31 ) Created: 2007-09-14 11:08:02 +0400 (15 months ago) | Author: pachanga | Changeset: 6298 -- restoring previous implementation of lmbActiveRecord :: import(..). experimental stuff failed
6297 annotated / raw | Diffs: previous, other | Lines: 1969 ( +50, -19 ) Created: 2007-09-14 00:38:57 +0400 (15 months ago) | Author: pachanga | Changeset: 6297 -- lmbActiveRecord :: _onAfterImport() hook added, it allows to customize imported stuff-- lmbActiveRecord :: import() experiments: a) it returns import success status b) it catches all exceptions and puts them into error list which c) can be passed into this method as a third optional argument
6221 annotated / raw | Diffs: previous, other | Lines: 1938 ( +1, -1 ) Created: 2007-08-07 11:24:35 +0400 (17 months ago) | Author: pachanga | Changeset: 6221 -- removing trailing ?> for PHP modules
6008 annotated / raw | Diffs: previous, other | Lines: 1938 ( +1, -1 ) Created: 2007-06-20 12:32:14 +0400 (18 months ago) | Author: serega | Changeset: 6008 Copied to: 3.x/branches/2007.3/limb/active_record/src/lmbActiveRecord.class.php 6070 -- lmbActiveRecord :: import() now set related object to null if appropriate property has empty string value "" as well as "null" value
5997 annotated / raw | Diffs: previous, other | Lines: 1938 ( +146, -70 ) Created: 2007-06-18 16:27:21 +0400 (18 months ago) | Author: pachanga | Changeset: 5997 -- 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()
5959 annotated / raw | Diffs: previous, other | Lines: 1862 ( +1, -1 ) Created: 2007-06-07 17:47:57 +0400 (19 months ago) | Author: pachanga | Changeset: 5959 -- fixing interfaces phpdoc header
5956 annotated / raw | Diffs: previous, other | Lines: 1862 ( +5, -0 ) Created: 2007-06-07 15:27:59 +0400 (19 months ago) | Author: pachanga | Changeset: 5956 -- convenience lmbActiveRecord :: _addError($message, $fields = array(), $values = array()) added
5950 annotated / raw | Diffs: previous, other | Lines: 1857 ( +16, -4 ) Created: 2007-06-06 17:54:07 +0400 (19 months ago) | Author: pachanga | Changeset: 5950 -- lmbActiveRecord :: isValid() added-- lmbActiveRecord :: _onValidate() is called after validator rules were processed -- lmbActiveRecord :: trySave($error_list) puts non lmbValidationExceptions into $error_list
5945 annotated / raw | Diffs: previous, other | Lines: 1845 ( +2, -1 ) Created: 2007-06-06 12:31:43 +0400 (19 months ago) | Author: pachanga | Changeset: 5945 -- adding dummy phpdoc block to each class
5944 annotated / raw | Diffs: previous, other | Lines: 1844 ( +12, -7 ) Created: 2007-06-06 10:58:26 +0400 (19 months ago) | Author: serega | Changeset: 5944 -- 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.See lmbActiveRecordOneToManyRelationsTest :: testChangingParentIdRelationFieldDirectly() lmbActiveRecordOneToManyRelationsTest :: testChangingParentIdRelationFieldDirectlyDoesNotWorkIfParentObjectIsDirty() and also lmbActiveRecordOneToOneRelationsTest :: testChangingChildObjectIdDirectly() lmbActiveRecordOneToOneRelationsTest :: testChangingChildIdRelationFieldDirectlyHasNoAffectIfChildObjectPropertyIsDirty() -- lmbActiveRecord :: resetDirty() public method added.
5942 annotated / raw | Diffs: previous, other | Lines: 1839 ( +6, -9 ) Created: 2007-06-05 23:22:26 +0400 (19 months ago) | Author: pachanga | Changeset: 5942 -- "Oops, I did it again" :) Changing header once again...
5938 annotated / raw | Diffs: previous, other | Lines: 1842 ( +66, -1 ) Created: 2007-06-05 15:38:45 +0400 (19 months ago) | Author: serega | Changeset: 5938 -- 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).
5936 annotated / raw | Diffs: previous, other | Lines: 1777 ( +16, -14 ) Created: 2007-06-05 10:30:30 +0400 (19 months ago) | Author: pachanga | Changeset: 5936 -- 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
5933 annotated / raw | Diffs: previous, other | Lines: 1775 ( +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
5902 annotated / raw | Diffs: previous, other | Lines: 1775 ( +44, -2 ) Created: 2007-05-18 18:36:13 +0400 (19 months ago) | Author: pachanga | Changeset: 5902 -- 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.
5887 annotated / raw | Diffs: previous, other | Lines: 1733 ( +5, -4 ) Created: 2007-05-14 12:27:06 +0400 (19 months ago) | Author: pachanga | Changeset: 5887 -- 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
5868 annotated / raw | Diffs: previous, other | Lines: 1732 ( +49, -40 ) Created: 2007-05-11 18:52:12 +0400 (19 months ago) | Author: pachanga | Changeset: 5868 -- lmbActiveRecord :: _doSave() rolls back transaction if there were any exception-- lmbActiveRecord :: trySave() catches generic Exception not just lmbValidationException
5863 annotated / raw | Diffs: previous, other | Lines: 1723 ( +13, -11 ) Created: 2007-05-11 16:56:42 +0400 (19 months ago) | Author: pachanga | Changeset: 5863 -- 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 lazy
5858 annotated / raw | Diffs: previous, other | Lines: 1721 ( +8, -1 ) Created: 2007-05-10 18:46:38 +0400 (19 months ago) | Author: pachanga | Changeset: 5858 -- lmbActiveRecord :: deleteRaw($class_name, $criteria=null) - it deletes records directly in database-- lmbActiveRecord :: update(..) => updateRaw()
5855 annotated / raw | Diffs: previous, other | Lines: 1714 ( +7, -0 ) Created: 2007-05-10 14:30:43 +0400 (19 months ago) | Author: pachanga | Changeset: 5855 -- initial version of lmbActiveRecord :: update($class_name, $set, $criteria = null) added, it simply updates records in DB without loading objects into memory
5829 annotated / raw | Diffs: previous, other | Lines: 1707 ( +8, -1 ) Created: 2007-05-08 13:01:52 +0400 (20 months ago) | Author: serega | Changeset: 5829 -- $_has_one and $_many_belongs_to relations in lmbActiveRecord do not set object as dirty if relation field did not change in _savePreRelationObject();
5763 annotated / raw | Diffs: previous, other | Lines: 1700 ( +62, -42 ) Created: 2007-04-24 15:31:29 +0400 (20 months ago) | Author: pachanga | Changeset: 5763 -- 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')
5758 annotated / raw | Diffs: previous, other | Lines: 1680 ( +3, -3 ) Created: 2007-04-24 14:19:09 +0400 (20 months ago) | Author: pachanga | Changeset: 5758 -- using new lmbDelegate :: invokeAll()
5645 annotated / raw | Diffs: previous, other | Lines: 1680 ( +4, -4 ) 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
5605 annotated / raw | Diffs: previous, other | Lines: 1680 ( +24, -0 ) Created: 2007-04-10 18:39:32 +0400 (20 months ago) | Author: pachanga | Changeset: 5605 -- lmbActiveRecord :: findFirstBySql(..) and its alias findOneBySql(..) added
5604 annotated / raw | Diffs: previous, other | Lines: 1656 ( +6, -1 ) Created: 2007-04-10 17:42:56 +0400 (20 months ago) | Author: pachanga | Changeset: 5604 -- lmbActiveRecord :: getInheritanceCondition() added
5592 annotated / raw | Diffs: previous, other | Lines: 1651 ( +1, -1 ) Created: 2007-04-10 11:50:37 +0400 (20 months ago) | Author: pachanga | Changeset: 5592 -- using lmb_require instead of require_once
5560 annotated / raw | Diffs: previous, other | Lines: 1651 ( +2, -2 ) Created: 2007-04-06 17:07:10 +0400 (21 months ago) | Author: pachanga | Changeset: 5560 -- changes due to datasource package cleanup(DS-1)
5541 annotated / raw | Diffs: previous, other | Lines: 1651 ( +1, -1 ) Created: 2007-04-05 17:31:01 +0400 (21 months ago) | Author: pachanga | Changeset: 5541 -- passing lmbActiveRecord object in constructor calls import
5540 annotated / raw | Diffs: previous, other | Lines: 1651 ( +8, -3 ) Created: 2007-04-05 17:27:34 +0400 (21 months ago) | Author: pachanga | Changeset: 5540 -- lmbActiveRecord :: _getValueObject() loads value object if it's not set, not only if it's not set and active record is new-- slow @ removed during value object loading
5538 annotated / raw | Diffs: previous, other | Lines: 1646 ( +6, -0 ) Created: 2007-04-05 16:48:29 +0400 (21 months ago) | Author: pachanga | Changeset: 5538 -- new event added - lmbActiveRecord :: _onSave(), it's called both in case of creating and updating
5529 annotated / raw | Diffs: previous, other | Lines: 1640 ( +22, -10 ) 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: 1628 ( +1628, -0 ) Created: 2007-04-03 19:38:26 +0400 (21 months ago) | Author: pachanga | Changeset: 5522 Moved from: 3.x/limb/active_record/src/lmbActiveRecord.class.php 5383 -- changing repos layout
5383 annotated / raw | Diffs: previous, other | Lines: 1628 ( +2, -2 ) Created: 2007-03-28 16:55:03 +0400 (21 months ago) | Author: pachanga | Changeset: 5383 Moved to: 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php 5522 Copied to: 3.x/tags/limb3-2007.2/active_record/src/lmbActiveRecord.class.php 5496 -- using new lmb_ prefixed global functions
5238 annotated / raw | Diffs: previous, other | Lines: 1628 ( +34, -3 ) Created: 2007-03-14 14:09:08 +0300 (21 months ago) | Author: pachanga | Changeset: 5238 -- 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'));
5020 annotated / raw | Diffs: previous, other | Lines: 1597 ( +16, -12 ) Created: 2007-02-12 12:08:53 +0300 (22 months ago) | Author: pachanga | Changeset: 5020 -- improving doc
5017 annotated / raw | Diffs: previous, other | Lines: 1593 ( +33, -19 ) Created: 2007-02-09 01:09:26 +0300 (22 months ago) | Author: pachanga | Changeset: 5017 -- fixing phpdoc comments
4983 annotated / raw | Diffs: previous, other | Lines: 1579 ( +386, -66 ) Created: 2007-02-08 18:23:53 +0300 (22 months ago) | Author: pachanga | Changeset: 4983 -- adding phpdoc comments
4976 annotated / raw | Diffs: previous, other | Lines: 1259 ( +16, -9 ) Created: 2007-02-07 14:59:50 +0300 (22 months ago) | Author: pachanga | Changeset: 4976 -- adding test PHPDoc for lmbActiveRecord class
4942 annotated / raw | Diffs: previous, other | Lines: 1252 ( +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: 1252 ( +10, -9 ) Created: 2007-02-07 13:43:39 +0300 (22 months ago) | Author: pachanga | Changeset: 4881 -- changing source files header
4828 annotated / raw | Diffs: previous, other | Lines: 1251 ( +1, -2 ) Created: 2007-02-02 18:22:38 +0300 (23 months ago) | Author: pachanga | Changeset: 4828 -- lmbActiveRecordMetaInfoSource => lmbActiveRecordMetaInfo-- lmbActiveRecordTools :: createActiveRecordMetaInfo(..) => getActiveRecordMetaInfo(..)
4826 annotated / raw | Diffs: previous, other | Lines: 1252 ( +12, -52 ) Created: 2007-02-02 17:04:14 +0300 (23 months ago) | Author: serega | Changeset: 4826 -- new class lmbActiveRecordMetaInfoSource - that contains db meta info for lmbActiveRecord class. This class helps to improve performance a bit-- lmbActiveRecordTools added
4808 annotated / raw | Diffs: previous, other | Lines: 1292 ( +65, -6 ) Created: 2007-01-29 16:41:13 +0300 (23 months ago) | Author: pachanga | Changeset: 4808 -- lmbActiveRecord :: registerGlobal*Callback(...) static methods added, it allows to register callbacks globally
4758 annotated / raw | Diffs: previous, other | Lines: 1233 ( +7, -0 ) Created: 2007-01-24 14:44:50 +0300 (23 months ago) | Author: pachanga | Changeset: 4758 -- lmbActiveRecord :: findBySql($class_name, $sql) added, it returns a result set of decorated with active record objects of specified $class_name
4708 annotated / raw | Diffs: previous, other | Lines: 1226 ( +1, -0 ) Created: 2007-01-09 13:09:12 +0300 (23 months ago) | Author: pachanga | Changeset: 4708 -- minor code beautifying fix
4691 new/moved annotated / raw | Diffs: previous, other | Lines: 1225 ( +1225, -0 ) Created: 2006-12-17 02:16:44 +0300 (2 years ago) | Author: pachanga | Changeset: 4691 Moved from: 3.x/packages/active_record/src/lmbActiveRecord.class.php 4619 -- changing repo layout
4619 new/moved annotated / raw | Diffs: previous, other | Lines: 1225 ( +1225, -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/lmbActiveRecord.class.php 4583 Moved to: 3.x/limb/active_record/src/lmbActiveRecord.class.php 4691 -- changing repo layout
4583 new/moved annotated / raw | Diffs: previous, other | Lines: 1225 ( +1225, -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/lmbActiveRecord.class.php 4578 Moved to: 3.x/packages/active_record/src/lmbActiveRecord.class.php 4619 -- changing repo layout
4578 annotated / raw | Diffs: previous, other | Lines: 1225 ( +31, -34 ) Created: 2006-12-15 18:14:53 +0300 (2 years ago) | Author: pachanga | Changeset: 4578 Moved to: 3.x/packages/_active_record/trunk/src/lmbActiveRecord.class.php 4583 -- VERSION changes-- lmbActiveRecord code internal refactoring
4575 annotated / raw | Diffs: previous, other | Lines: 1228 ( +23, -5 ) Created: 2006-12-15 17:55:33 +0300 (2 years ago) | Author: serega | Changeset: 4575 -- better check for relation property dirtiness
4525 annotated / raw | Diffs: previous, other | Lines: 1210 ( +6, -0 ) Created: 2006-12-12 13:55:00 +0300 (2 years ago) | Author: pachanga | Changeset: 4525 -- lmbActiveRecord :: _importEntity() now sets explicitly null value if 'null' string or null value is passed during lmbActiveRecord :: import() procedure-- experimental support for setting null values for entities which 'can_be_null'(described in $_many_belongs_to and $_has_one)
4516 annotated / raw | Diffs: previous, other | Lines: 1204 ( +6, -5 ) Created: 2006-12-07 12:25:39 +0300 (2 years 1 month ago) | Author: pachanga | Changeset: 4516 -- resolving dirtiness issue with magic attributes: no more magic attributes(AR-5)-- minor improvements
4500 annotated / raw | Diffs: previous, other | Lines: 1203 ( +110, -1 ) Created: 2006-11-30 16:54:05 +0300 (2 years 1 month ago) | Author: tony | Changeset: 4500 -- fixed a bug with lmbAROneToManyCollection didn't save changes already linked (related) objects to set() method-- lmbActiveRecord now supports different events subscribing allowing clients to subscribe on events like onBeforeSave, onBeforeUpdate, onBeforeDestroy etc. -- lmbActiveRecord :: _onBeforeDestroy() and :: _onAfterDestroy() methods added.
4494 annotated / raw | Diffs: previous, other | Lines: 1094 ( +18, -4 ) Created: 2006-11-24 18:39:33 +0300 (2 years 1 month ago) | Author: tony | Changeset: 4494 -- minor changes in lmbActiveRecord that allow developers to extend methods that saves/removed db records
4492 annotated / raw | Diffs: previous, other | Lines: 1080 ( +3, -0 ) Created: 2006-11-21 14:50:10 +0300 (2 years 1 month ago) | Author: serega | Changeset: 4492 -- added 'cascade_delete' flag for has_one relation telling if destroy should not remove child object as well (false value)
4488 annotated / raw | Diffs: previous, other | Lines: 1077 ( +65, -17 ) Created: 2006-11-20 16:46:20 +0300 (2 years 1 month ago) | Author: serega | Changeset: 4488 -- refactoring of one-to-one relation in ACTIVE_RECORD package (as in AR-4 )
4469 annotated / raw | Diffs: previous, other | Lines: 1029 ( +7, -4 ) Created: 2006-11-15 15:05:26 +0300 (2 years 1 month ago) | Author: pachanga | Changeset: 4469 -- $_db_table_name is set in lmbActiveRecord if it was not set
4466 annotated / raw | Diffs: previous, other | Lines: 1026 ( +18, -4 ) Created: 2006-11-15 12:30:28 +0300 (2 years 1 month ago) | Author: pachanga | Changeset: 4466 -- 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
4445 annotated / raw | Diffs: previous, other | Lines: 1012 ( +2, -0 ) Created: 2006-11-07 17:52:49 +0300 (2 years 1 month ago) | Author: pachanga | Changeset: 4445 -- lmbActiveRecord :: find throws an exception if magic params art not valid-- better test dependencies checks
4419 annotated / raw | Diffs: previous, other | Lines: 1010 ( +2, -1 ) Created: 2006-10-30 18:38:56 +0300 (2 years 2 months ago) | Author: pachanga | Changeset: 4419 -- changes due to DBAL-2
4411 annotated / raw | Diffs: previous, other | Lines: 1009 ( +4, -2 ) Created: 2006-10-30 12:52:48 +0300 (2 years 2 months ago) | Author: serega | Changeset: 4411 -- ACTIVE_RECORD package tests .init.php now require_once DBAL toolkit.inc.php-- lmbActiveRecord passed it's error_list to lmbValidationException
4362 annotated / raw | Diffs: previous, other | Lines: 1007 ( +1, -1 ) Created: 2006-10-27 14:01:54 +0400 (2 years 2 months ago) | Author: pachanga | Changeset: 4362 -- fixing svn:keywords
4310 annotated / raw | Diffs: previous, other | Lines: 1007 ( +7, -1 ) Created: 2006-10-25 16:53:16 +0400 (2 years 2 months ago) | Author: pachanga | Changeset: 4310 -- lmbActiveRecord :: setDefaultDbDSN($dsn) added-- changes due to lmbDbTools :: getDbConnection() => getDefaultDbConnection() -- common.inc.php added
4262 annotated / raw | Diffs: previous, other | Lines: 1001 ( +41, -10 ) Created: 2006-10-19 17:36:39 +0400 (2 years 2 months ago) | Author: pachanga | Changeset: 4262 -- Static find methods are overrideable in concrete classes(AR-3) via instance methods: _find(..), _findById(..), _findByIds(..), _findFirst(..)
4215 annotated / raw | Diffs: previous, other | Lines: 970 ( +12, -10 ) 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)
4146 annotated / raw | Diffs: previous, other | Lines: 968 ( +22, -5 ) Created: 2006-10-10 19:28:12 +0400 (2 years 2 months ago) | Author: pachanga | Changeset: 4146 -- much better checks for object's dirtiness implemented(LMBF-1), object is considered to be dirty if its property which refers to parent(_belongs_to relation) was changed or property which exists in the object's db table
4141 annotated / raw | Diffs: previous, other | Lines: 951 ( +6, -1 ) Created: 2006-10-05 17:31:31 +0400 (2 years 3 months ago) | Author: pachanga | Changeset: 4141 -- field with missing column info are set directly(is it legal?)
4139 annotated / raw | Diffs: previous, other | Lines: 946 ( +61, -63 ) Created: 2006-10-05 14:07:43 +0400 (2 years 3 months ago) | Author: pachanga | Changeset: 4139 -- better implementation of value objects(magic getters/setters are now fully supported for value objects)-- misc internal refactorings: * _setValueObject() is not called in set() and renamed to _importValueObject() * _processLoadedData() refactored into _decodeDbValues(), _decodeDbValue() methods * _setDbValue() added
4135 annotated / raw | Diffs: previous, other | Lines: 948 ( +8, -8 ) Created: 2006-10-04 17:24:23 +0400 (2 years 3 months ago) | Author: pachanga | Changeset: 4135 -- minor internal refactoring: _isTyped() => _isInheritable()
4127 annotated / raw | Diffs: previous, other | Lines: 948 ( +8, -1 ) Created: 2006-10-03 18:05:57 +0400 (2 years 3 months ago) | Author: pachanga | Changeset: 4127 -- it's possible to override base class for one table inheritance using $_base_class attribute
4124 annotated / raw | Diffs: previous, other | Lines: 941 ( +29, -2 ) 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
4116 annotated / raw | Diffs: previous, other | Lines: 914 ( +2, -2 ) Created: 2006-10-02 19:06:00 +0400 (2 years 3 months ago) | Author: serega | Changeset: 4116 -- lmbActiveRecord :: getDataset accepts $magic_params
4065 annotated / raw | Diffs: previous, other | Lines: 914 ( +4, -17 ) Created: 2006-09-27 20:44:23 +0400 (2 years 3 months ago) | Author: pachanga | Changeset: 4065 -- lmbActiveRecord :: getAttributesNames() removed + some other minor refactoring
|