Mark Story
913450daef
Additional tests for virtualFields and fixing issues with index 0 being removed. Fixes #208
2010-01-21 10:35:20 -05:00
Juan Basso
c4afeb3fe6
Minor optimization on datasource and Mysql[i].
2010-01-20 01:44:59 -04:30
Mark Story
e1b0c41254
Making Model::isVirtualField() and Model::getVirtualField() work with both Model.field
as field
. This fixes a number of issues in conditions, and fields arrays when model aliases are used. Fixes #208 and #220
2010-01-19 09:22:13 -05:00
Mark Story
080e34718d
Minor refactor, and adding tests from previous commit. Fixes #208
2010-01-18 21:57:03 -05:00
AD7six
7943f3d168
allowing vritual fields to work whether specified with a model alias or
...
not. by concequence allows find('list', array('fields' => array('id',
'virtual'))) to work
2010-01-18 21:54:15 -05:00
Juan Basso
473e07a674
Putting __() in strings that missing internationalization.
...
Signed-off-by: Mark Story <mark@mark-story.com>
2010-01-18 01:06:25 -05:00
Mark Story
826dbc466f
Fixing failing test caused by merge with 1.2
2010-01-16 18:26:06 -05:00
Mark Story
09ad7418f5
Merge remote branch 'origin/1.2' into merger
...
Conflicts:
cake/console/templates/skel/config/inflections.php
cake/libs/model/cake_schema.php
cake/libs/model/model.php
2010-01-15 11:51:58 -05:00
Mark Story
af4e9ba76e
Fixing php4 reference issues in CakeSchema.
2010-01-14 22:18:26 -05:00
Joël Perras
adb0c809a0
Refactoring Model::exists() to be independent of Model::$useTable. Fixes #199 .
...
Model::exists() now makes no check whatsoever on the value of
Model::$useTable. This means that, as with a database-backed dbo,
Model::exists() will call Model::find('count') (which in turn calls
DataSource::read()) to determine if the record identified by Model::$id
already exists in the datasource.
2010-01-14 16:47:08 -05:00
Joël Perras
199a14f3be
Updating Model::exists() to be more side-effect free.
...
Model::exists() no longer monkeys with the internal state of
Model::$__exists. The optional $reset parameter has also been removed,
as it is no longer needed.
2010-01-14 16:47:08 -05:00
Joël Perras
137704e397
Optimization to Model::save().
2010-01-14 16:47:08 -05:00
Joël Perras
4d1f6b82e8
Removing use of subclass method 'fullTableName()' in Datasource superclass. Fixes #100 .
2010-01-13 23:19:10 -05:00
José Lorenzo Rodríguez
8496055059
Adding php5 check to avoid errors when using __get() or __isset() methods in models
2010-01-13 12:57:41 -04:30
Mark Story
d8e7aa929c
Merge branch '1.3-misc' into 1.3
2010-01-12 17:18:14 -05:00
José Lorenzo Rodríguez
aa9258cbd1
Adding test for DboSource::group() and virtual fields
...
Closes #184
2010-01-11 12:22:59 -04:30
José Lorenzo Rodríguez
3fe4b46614
Fixing DboSource::group() to test for virtual fields when first parameter is not an array
2010-01-11 12:06:27 -04:30
José Lorenzo Rodríguez
cecfd72f28
Fixing parse error in php 4
2010-01-11 11:51:55 -04:30
Phally
bbb105fc8c
Added virtual field support for GROUP BY.
2010-01-11 11:46:59 -04:30
Mark Story
dda2414b5b
Fixing compatibility in ConnectionManager with php4. Fixes #187
2010-01-11 09:48:53 -05:00
Mark Story
4ada5b7eea
Fixing notice errors caused by incorrect datatyping in php4.
2010-01-11 09:44:51 -05:00
Mark Story
896414e632
Fixing parse error in PHP4 caused by optional arguments with default
...
values being passed by reference. Fixes #180
2010-01-11 09:40:56 -05:00
Joël Perras
730153b151
Adding isset() checks for CakeSchema::compare() when diff'ing db indexes.
...
Allows for slightly better interoperability between schemas generated with CakePHP 1.2 and with 1.3
2010-01-07 17:49:57 -05:00
predominant
804fba1a22
Adding block comments for Postgres Datasource quotes.
2010-01-05 23:23:23 +11:00
Mark Story
7dcf66dd95
Removing dynamic calling of setTablePrefix(). tableprefix should be with the tablePrefix property, and any other custom construction behavior should be done in an overridden Model::__construct.
2010-01-02 00:07:31 -05:00
Mark Story
eab706e772
Correcting and improving doc block for Model::__construct.
2010-01-01 23:59:36 -05:00
Mark Story
026eeb645b
Correcting and improving doc block for Model::__construct.
2010-01-01 23:58:07 -05:00
tPl0ch
1eff024e7e
Removed unnessecary connect keys from all Dbo's _baseConfig. Updated connect methods where needed. Fixes #132
...
Signed-off-by: Mark Story <mark@mark-story.com>
2009-12-27 12:47:52 -05:00
Mark Story
8b93235847
Fixing auto merge issues.
2009-12-27 12:45:34 -05:00
Mark Story
7a620b62b0
Merge branch '1.3-misc' into mergers
...
Conflicts:
cake/libs/model/datasources/dbo_source.php
cake/libs/view/helpers/js.php
2009-12-27 12:45:12 -05:00
Mark Story
6b2154d961
Merge branch '1.2' into mergers
...
Conflicts:
cake/libs/inflector.php
cake/tests/cases/libs/model/model_validation.test.php
2009-12-27 12:34:27 -05:00
Mark Story
425dcf2df5
Applying patch from 'tPl0ch', connect key is set to 'mysql_connect' when not using persistent connections. Fixes #132
2009-12-22 13:23:55 -05:00
Mark Story
34410de7c8
Adding property definition for Model::$virtualFields
2009-12-20 16:26:12 -05:00
Mark Story
4ac0a55aff
Merge branch 'virtual-fields' into 1.3-misc
...
Conflicts:
cake/tests/cases/libs/controller/controller.test.php
2009-12-19 19:40:12 -05:00
Mark Story
13ffcbc0ba
Updating doc blocks in Datasource. Adding missing reference operators.
2009-12-19 13:23:46 -05:00
Mark Story
7387cfdf6b
Adding @access tags and expanding doc blocks.
2009-12-19 13:06:32 -05:00
Mark Story
7fd9b5ae3b
Removing auto dump of sql log.
2009-12-19 12:40:32 -05:00
Mark Story
a89fcba243
Updating DboSource::getLog() and showLog() to use a View element.
...
Updating tests to reflect changes in getLog()
2009-12-19 12:09:01 -05:00
Mark Story
cbb29dcc5d
Extracting sql dump generation into a view element.
...
Changing the behavior of DboSource::getLog().
Adding sql dump element to layout.
2009-12-19 12:09:01 -05:00
Mark Story
959befb6e1
Merge commit 'josezap/virtual-fields' into virtual-fields
2009-12-18 19:11:50 -05:00
José Lorenzo Rodríguez
8f29f59c1a
Enclosing virtual fields in parentheses to avoid SQL errors
...
Added new tests to improve code coverage on virtual fields
2009-12-17 14:42:46 -04:30
Mark Story
b190e462b8
Fixing whitespacing.
2009-12-17 00:15:42 -05:00
Mark Story
4ac29963a8
Refactoring Model::__validateWithModels. Should be slightly faster as loops are smaller.
2009-12-15 22:55:34 -05:00
Mark Story
a490e249fa
Adding test for validation of with models canceling a save.
...
Adding initial implementation of Model::__validateWithModel().
Correcting error in previous commit. Adding tests for saveAll and validating habtm with models.
2009-12-15 22:55:22 -05:00
ADmad
33038c75ac
Removing redundant 'isset' check from DboMysql::connect
2009-12-15 20:41:44 +05:30
Mark Story
02330b2d9c
Making DboSource::fields() accept an expression object. Fixes issues with sql parsing over quoting special SQL syntax.
...
Tests added
Fixes #66
2009-12-13 15:52:07 -05:00
José Lorenzo Rodríguez
c65e2f3f18
Quoting virtual fields in automatically
...
Updating test cases
2009-12-10 20:46:55 -04:30
José Lorenzo Rodríguez
8c4cad86c2
Fixing erroris due to bad rebase
2009-12-10 20:35:24 -04:30
José Lorenzo Rodríguez
4b9e03c9f7
Creating accesor methods for virtual fields and replacing direct access from DboSource with new methods
2009-12-10 20:08:14 -04:30
José Lorenzo Rodríguez
7a7d0de988
Adding support for virtual fields in DboSourse::calculate
2009-12-10 20:08:14 -04:30