Commit graph

724 commits

Author SHA1 Message Date
Mark Story
cdd87849cc Fixing @link tags to ease merging. 2010-01-26 17:03:03 -05:00
Mark Story
5fcbc33a75 Adding tests for CURRENT_TIMESTAMP to DboSource. 2010-01-25 12:25:14 -05:00
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
ADmad
570c9e5304 Cleaning up commented and unneeded test cases and moving tests to more appropriate file 2010-01-21 01:42:54 +05: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
9f8e0e163e Removing getTests included by accident. 2010-01-18 21:59:18 -05:00
Mark Story
080e34718d Minor refactor, and adding tests from previous commit. Fixes #208 2010-01-18 21:57:03 -05:00
Mark Story
5203397a6a Adding error expectation to model_write test. Models using useTable = false, will still issue count queries to their datasources when exists() is called. 2010-01-16 20:24:27 -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
371ac3971a Fixing php4 compatibility in model_read test. 2010-01-14 23:38:24 -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
José Lorenzo Rodríguez
04562982b2 Fixing doc block 2010-01-11 15:34:16 -04:30
José Lorenzo Rodríguez
aa9258cbd1 Adding test for DboSource::group() and virtual fields
Closes #184
2010-01-11 12:22:59 -04:30
Phally
bbb105fc8c Added virtual field support for GROUP BY. 2010-01-11 11:46:59 -04:30
Mark Story
4ada5b7eea Fixing notice errors caused by incorrect datatyping in php4. 2010-01-11 09:44:51 -05:00
Mark Story
3c88d81735 Adding tests for model method validation with multiple parameters and addition of original validation rule to method params. Closes #149 2010-01-01 23:34:11 -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
22cf13b6b6 Updating DboSource test to remove protected access and use methods instead. 2009-12-19 19:54:49 -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
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
18c878b3f5 More whitespace fixes. 2009-12-18 19:18:23 -05:00
Mark Story
ab21855efd Fixing whitespacing. 2009-12-18 19:16:10 -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
98e7575c5a Adding documentation on tests 2009-12-17 14:50:36 -04:30
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
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
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
e7ee5e9eda Fixing faling test case 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
José Lorenzo Rodríguez
d06ff5d10a Adding support for virtual fields in conditions array 2009-12-10 20:08:14 -04:30
José Lorenzo Rodríguez
051d352eab Reimplementing DboSource::order() to avoid recursion so it can be more easily manipulated to add virtual fields (and hopefully to make it a little bit faster) 2009-12-10 20:08:14 -04:30
José Lorenzo Rodríguez
7efafc685e Fixing virtual fields fetching for Model::field() calls
Adding doc blocks
2009-12-10 20:08:13 -04:30
José Lorenzo Rodríguez
a81edb6080 Extending virtual fields implementation to work on queries with field list 2009-12-10 20:07:46 -04:30
José Lorenzo Rodríguez
53765312df Initial implementation of model virtual fields 2009-12-10 20:07:07 -04:30
José Lorenzo Rodríguez
ec672e99e8 Fixing virtual fields fetching for Model::field() calls
Adding doc blocks
2009-12-10 20:05:10 -04:30
José Lorenzo Rodríguez
00c0bb4d62 Extending virtual fields implementation to work on queries with field list 2009-12-10 20:01:58 -04:30
José Lorenzo Rodríguez
19c91f1f70 Initial implementation of model virtual fields 2009-12-10 20:01:58 -04:30
predominant
df151395c5 Moving certain datasources to the Datasources Plugin (http://github.com/cakephp/datasources) 2009-12-11 01:07:23 +11:00
predominant
c64389006d Removing "Long description for file" from /cake/tests tree. 2009-12-08 20:19:42 +11:00
mark_story
1f5c6eac2e Fixing issues in tests caused by overwritten columns.
Fixing issue where mysqli had errors using getCharsetName, moving DboMysqlBase::getCharset down to DboMysql.
2009-12-06 21:46:05 -05:00
mark_story
7259a1b920 Merge branch '1.2' into 1.2-merger
Conflicts:
	cake/libs/model/datasources/dbo/dbo_mysql.php
	cake/libs/model/datasources/dbo/dbo_mysqli.php
	cake/libs/view/helpers/text.php
	cake/libs/view/theme.php
2009-12-06 21:43:53 -05:00
mark_story
cc750d15f1 Adding test to disprove #385. Proves saveAll with validate => first behaves correctly. 2009-12-04 14:39:12 -05:00
mark_story
4d37e75f18 Merge branch '1.2' into 1.3-merger
Conflicts:
	cake/console/libs/tasks/controller.php
	cake/console/libs/tasks/extract.php
	cake/console/libs/tasks/model.php
	cake/libs/configure.php
	cake/libs/controller/components/cookie.php
	cake/libs/debugger.php
	cake/libs/flay.php
	cake/libs/http_socket.php
	cake/libs/inflector.php
	cake/libs/model/cake_schema.php
	cake/libs/model/connection_manager.php
	cake/libs/model/datasources/dbo/dbo_mysql.php
	cake/libs/model/datasources/dbo_source.php
	cake/libs/router.php
	cake/libs/view/helper.php
	cake/libs/view/helpers/form.php
	cake/libs/view/helpers/html.php
	cake/libs/view/helpers/js.php
2009-11-22 20:38:50 -05:00
mark_story
2e0acbf505 Making habtm join conditions used by __saveMulti when finding link records to remove. It should be noted that having conditions on non-joinTable tables, and not having a model on the joinTable can cause SQL issues. Fixes #304 2009-11-22 17:56:46 -05:00
mark_story
6c3bcdd7e6 Removing commented code. 2009-11-22 17:34:11 -05:00
Juan Basso
71df8dbbba Replace function sizeof (alias) by count.
Signed-off-by: Mark Story <mark@mark-story.com>
2009-11-21 13:50:57 -05:00