mark_story
370b20dce6
Minor optimizations
...
Closes #5249 and #5282
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7664 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-26 00:46:53 +00:00
mark_story
62168bfe0f
Updating doc blocks to include access and return PHPDOC tags.
...
Removing use of e() in Debugger.
Fixing code formatting in CookieComponent
Closes #5477
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7662 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-25 16:49:56 +00:00
DarkAngelBGE
4ce3f21608
adding missing options array in Model::beforeValidate(0 and Model::beforeSave() as they are called with them out of the model and it is good practice, although they are meant to be overriden; closes #5470
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7650 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-23 18:50:27 +00:00
nate
24b444ca55
Fixing behavior initialization in model construction, adding Set::flatten() utility method for future refactoring, updating Set test
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7644 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-22 16:32:41 +00:00
nate
d9b357d05c
Making Model::$_findMethods protected, and fixing fatal error when table calls are attempted on a model with a missing table
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7640 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-21 04:09:16 +00:00
gwoo
931d996d90
fixes #5438 , multiple binding with alias
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7632 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-19 15:27:43 +00:00
nate
57c633a64f
Adding proper callback disabling for multiple finder types, fixes #5343
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7549 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-04 01:00:08 +00:00
mark_story
a8bb2eb826
Fixing saveAll() using validate => only, applied patch from 'ADmad'. saveAll() now returns value of all validations, not just the last row to be validated. Closes #5376 . Tests added.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7547 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-03 16:44:48 +00:00
phpnut
6bdc60731f
Adding more changes to improve performance. Fixes loading of Models when instance has already been created in the registry
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7527 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-27 16:43:15 +00:00
DarkAngelBGE
7863669dab
prevent model->save() validating all fields when a fieldList option is supplied, closes #5320
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7519 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-27 08:01:00 +00:00
nate
1940d8877c
Fixing Model/db $cacheSources conflicts, model can now disable only. Fixes #5177
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7518 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-27 04:55:15 +00:00
gwoo
7fe1a03fda
fixes #5331 , model alias no longer overwritten
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7515 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-27 01:30:09 +00:00
DarkAngelBGE
285d075475
Fxiing validation error when trying to update records using saveAll for hasMany fixes #4981
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7506 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-26 13:31:07 +00:00
gwoo
e35a215883
fixes #5307 , model name being overridden by class registry for no reason, thanks to vizjerai for the helpful ticket.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7501 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-25 22:33:36 +00:00
mark_story
ce8dccc1fc
Expanding docblock on model::save()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7491 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-23 21:31:38 +00:00
mark_story
b3b9827862
Changed check for tablePrefix. Closes #5266
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7476 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-19 01:18:33 +00:00
nate
dfc115d5da
Updating findCount() calls to find('count') in Model test, fixing custom field counting support, regex typo in DataSource
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7466 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-14 16:52:29 +00:00
gwoo
995040a98a
fixes #5239 , primary key for HABTM, reverts last change for #5233 which broke the tests
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7454 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-11 16:18:19 +00:00
gwoo
76f7d6dc43
making changes to all the model group to run. Currently I get 8/8 test cases complete: 1486 passes, 22 fails and 3 exceptions.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7439 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-07 15:36:26 +00:00
AD7six
739c5169e4
fixes #5064 Preventing 'floating' results from being returned by find('threaded')
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7414 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-01 16:49:56 +00:00
nate
793295036f
Re-fixing Model::set() to allow for fields that don't exist, fixing model validation with messages, adding tests to prove parameter order for custom validation errors, refs #50005
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7408 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-01 06:28:59 +00:00
gwoo
f6d269a9e0
closes #5142 primary key on custom join models
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7393 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-31 15:38:23 +00:00
mark_story
8b28eec1ab
Removed almost all am() calls from core.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7389 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-31 00:16:16 +00:00
TommyO
7c7410bda2
Replaced instances of ife() with more sutiable alternatives in model.php
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7384 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-30 16:26:48 +00:00
mark_story
3c1ebafa0a
Modified dbo_mysql update() fixes issue with updateCounterCache on self join tables. updateCounterCache query optimized. Closes #4652 , #5152
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7376 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-30 02:22:15 +00:00
mark_story
96b5a6fa87
Added test to prove #5125 . Added documentation to updateAll.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7373 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-29 01:18:57 +00:00
mark_story
ac45340a71
Optimization when checking for setTable prefix.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7370 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-27 15:55:49 +00:00
mark_story
9b857e9f36
Added camelCase check for setTablePrefix. setTablePrefix now fires on PHP5. Closes #5147
...
Updated test in model.test to reflect changes in empty string handling for float and integer types.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7368 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-27 04:19:54 +00:00
phpnut
bdc3685e62
Fixes #5024 , find('threaded') returns empty array if root node is not included in the results.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7321 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-05 14:10:42 +00:00
phpnut
84069e372f
Fixes #5021 , findAllThreaded does not work with tables that have set primaryKey to something other than 'id'
...
Removed am() from Model::_findThreaded();
Cleaned up error.php and dispatcher.test.php
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7318 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-05 12:37:18 +00:00
phpnut
5131e1c3b3
Fixing undefined variable usage in Model::saveField();
...
Fixes #5053 Model:saveField $options bug;
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7316 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-05 11:02:09 +00:00
gwoo
7ad1790ea2
removing and moving deprecated code
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7285 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-27 06:19:04 +00:00
nate
14e8c5fe7b
Correcting inconsistent return values in Model::saveAll(), updating bad tests, fixes #4981
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7283 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-27 06:07:00 +00:00
AD7six
d000c59ceb
Deprecating findNeighbours
...
adding find('neighbors')
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7272 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-26 19:42:07 +00:00
AD7six
2ce0f1f3cf
deprecating findAllThreaded
...
removing __doThread
adding find('threaded')
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7271 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-26 19:33:44 +00:00
nate
7b6ee7386b
Correcting issue where TranslateBehavior hijacks find() calls from Model::exists(), fixes #4765
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7225 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-21 02:33:04 +00:00
nate
df75a06756
Fixing coding standards violations in core, and adding misc tests
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7222 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-20 20:17:23 +00:00
gwoo
c75cad26d5
updating model test for new find syntax
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7217 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-19 17:06:50 +00:00
gwoo
ce4cbba4f5
fixes #4944 , documentation of setDataSource
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7210 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-18 17:46:56 +00:00
phpnut
886183fcd4
Closes #4202
...
Adding patches
Added fixture files
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7198 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-16 03:11:32 +00:00
gwoo
4e36492440
fixes #4919 , updating model to use $this->__exists throughout
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7191 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-15 02:58:23 +00:00
gwoo
e57a7cc88c
fixes #4888 , closes #4864 Model::set when saving multi dimensional arrays, tests added from patch, thanks renan
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7184 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-14 20:39:27 +00:00
phpnut
8a30290862
Fixes #4883 Duplicated component name
...
Removed bad test since AppController::beforeFilter() is now run when Controller::constructClasses() is called.
Fixed bug with App::import() not caching properly.
More performance changes
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7169 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-11 08:54:27 +00:00
DarkAngelBGE
70aa290f5b
fixing find('list') calls with a fields array that doesn't contain the model alias, closes #4851
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7158 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-10 17:27:12 +00:00
mariano.iglesias
768e0c748b
Keeping index when setting validation errors for saveAll, fixes #4769 and closes #4462
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7079 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-31 22:01:47 +00:00
nate
39feb3f7c1
Refactoring DboSource. Model array conditions must now have comparison operators on the left side, fixes misc bugs, updated core to reflect changes
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7075 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-31 12:36:38 +00:00
nate
42da5aba81
Moving Cake folder to correct location
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7063 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-30 11:40:08 +00:00
DarkAngelBGE
e6e0d852a2
deleting cake folder from svn
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7061 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-30 10:59:16 +00:00
mark_story
78ff2ad4bd
Implemented 'group' by conditions for model finds. Added tests from 'wluigi' Closes #2833
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7057 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-29 12:27:23 +00:00
nate
6a99a6ba60
Changing Model::getColumnType() to return null for unknown fields, allowing for type introspection, updating docblock for Model::hasField(), fixes #4751
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7035 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-23 20:40:50 +00:00
nate
7402680cc1
Misc code formatting and whitespace fixes
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7020 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-23 05:11:41 +00:00
nate
f2ea3c8bb0
Refactoring DboSource to use Model in order to properly quote values by column type, correcting serial integer schema generation in DboPostgres, fixes #4702 , refactoring TreeBehavior to use DboSource::calculate(), fixes #4725 , updating docblocks, fixing DboSource test to be database-agnostic, misc. whitespace fixes, updating DboSource test to reflect new quoting rules
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7015 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-22 19:05:37 +00:00
nate
5def68bf30
Updating Model test to reflect TreeBehavior changes, adding association support to Model::getColumnType()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7005 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-22 12:56:41 +00:00
DarkAngelBGE
736b020a34
removing error surpression operators, fixes #3877
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6968 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-19 20:25:42 +00:00
the_undefined
f5db95b22a
Applied patch by 'jose_zap' for supporting binary uuid primary keys, fixes #4119
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6945 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-19 05:08:37 +00:00
the_undefined
71790792d0
Applied patch by 'preloader', closes #4561
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6937 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-19 02:31:26 +00:00
mariano.iglesias
05047a90b0
Making Model::resetAssociations public and changing tests that use it
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6909 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-17 16:23:46 +00:00
nate
d9a7170808
Adding validation message fixes for Model::saveAll() and hasOne associations, fixes #4561
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6898 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-16 06:03:33 +00:00
nate
0f1e075d68
Adding fix for Model::saveAll() with 'validate' => 'first' and hasMany records, fixes #4387 , adding test cases to disprove #4494
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6897 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-16 05:31:14 +00:00
TommyO
52037d15e4
Allow afterSave() callbacks to modify value of a data field, as per ticket #2465\nNecessary tests included
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6889 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-15 15:37:55 +00:00
the_undefined
ea9e91218e
Fixing bug in Model::saveField, closes #4511
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6877 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-15 03:16:36 +00:00
the_undefined
dd7aa25a20
Made custom save $options available throughout all filters and callbacks
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6861 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-13 23:34:59 +00:00
gwoo
c0f042e4ab
fixes #4432 , Model aliases. Updated cases. Removed usage of $this->model in model.test.php in favor of local variables
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6848 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-13 16:42:39 +00:00
the_undefined
d9a30eaa62
Fix for Model::saveAll validate => first, closes #4533
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6825 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-13 01:39:06 +00:00
the_undefined
823eb81dc7
Fixed bug in Model::__save validation logic, closes #4554
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6824 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-13 01:03:11 +00:00
the_undefined
232e3f7ec1
Fix for Model::saveAll bug, closes #4466
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6823 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-13 00:39:29 +00:00
mariano.iglesias
d412d7094f
Fixes #4467 , issue with 'atomic' on saveAll not properly rolling back transaction. Thanks amit for the test.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6702 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-04-19 17:33:17 +00:00
nate
16bfee9831
Correcting issue in Model::__save() to prevent overwriting of existing record data
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6700 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-04-19 13:30:11 +00:00
nate
ed51f78227
Adding Model::saveAll() atomic fix, closes #4400 , thanks joelmoss
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6697 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-04-18 13:14:40 +00:00
nate
8f3a2c6022
Refactoring model constructor
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6678 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-04-17 13:10:27 +00:00
phpnut
5692ed149b
"Updating doc comments for Model::create()"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6630 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-04-03 15:22:18 +00:00
phpnut
118c35f0d0
"Closes #4402 , Model->create returns unexpected data type - sometimes.
...
Change to return Model::data; instead of true when empty"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6625 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-04-02 19:46:15 +00:00
nate
c4a4e9da39
Fixing handling of atomic transaction support with hasMany in Model::saveAll(), fixes #4372
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6596 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-22 21:23:06 +00:00
nate
0ca3915668
Forcing array in Model::invalidFields(), fixes #4362
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6592 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-19 01:34:23 +00:00
phpnut
a6fbe05964
"Initial refactoring of BehaviorCollection.
...
Fixed vendor path being the first searched directory for files, this caused unexpected results.
Fixed failing DboSource tests"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6583 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-16 05:44:20 +00:00
nate
360b91eea7
Fixing HABTM associations on non-standard keys, fixes #4219 , refactoring DboSource::calculate()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6565 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-13 03:11:29 +00:00
nate
c1c35b2e13
Refactoring DboSource - removes all SQL from Model, refactoring transaction handling
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6557 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-11 02:44:33 +00:00
phpnut
5374807164
"Fixes #3846 , Security blackhole when no radio selected
...
Fixes #3920 , Multiple select w/ checkboxes issues warning when all are unselected
Fixes #3962 , validation POST never pass when select multiple is submit
"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6546 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-10 00:25:59 +00:00
nate
9e37b6fc26
Adding test cases for saving hasMany associations with saveAll(), ref #4035
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6536 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-09 07:59:23 +00:00
nate
e87d4e80dd
Refactoring behavior method dispatch handling to work on PHP4, fixes #4296 , refactoring schema test
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6532 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-09 06:24:40 +00:00
nate
0ee0324e20
Improving validation support in Model::saveAll(), adding tests for cross-database joins, disproves #4251
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6511 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-07 01:29:19 +00:00
nate
9fbf783286
Adding database prefix check in Model::setDataSource()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6501 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-01 20:30:01 +00:00
nate
5ce4469867
Adding fix for parenting issues in Tree behavior, fixes #4043 , fixes #4037
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6500 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-01 20:26:42 +00:00
nate
6546a39098
Updating Model::setDataSource(), table prefixes now switch when switching DataSource, unless a custom table prefix is set, fixes #4062
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6496 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-01 05:15:53 +00:00
nate
e58c397bc9
Adding fix for loading join models classes from plugins, fixes #4014
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6493 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-01 03:25:46 +00:00
nate
ab50975306
Correcting UPDATE query generation to support SQL standards and MySQL-specific features in parallel, fixes #4080
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6491 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-03-01 03:12:12 +00:00
gwoo
1fbc3e6a9b
quick fix for with and saveMulti
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6490 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-29 22:01:09 +00:00
nate
c8ed9424da
Fixing errors thrown in Model::exists() when $useTable is false
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6484 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-28 04:35:20 +00:00
nate
97dded350f
Returning default column type for models with no schema defined
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6482 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-28 01:53:54 +00:00
nate
3a11fe2340
Refactoring find types in Model::find()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6481 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-28 01:50:38 +00:00
nate
3140144a1f
Adding behavior test case and fixing validation behavior methods, fixes #4205
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6471 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-24 02:47:10 +00:00
nate
0572926d49
Refactoring model behavior handling
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6469 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-21 15:36:13 +00:00
nate
89052b0f54
Adding performance enhancement to Set::numeric(), adding $filterKey param to Model::create() to overwrite primary keys, closes #4046
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6438 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-06 02:35:12 +00:00
nate
881cf3fc0a
Adding foreign key check to Model::updateCounterCache(), fixes #4049
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6425 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-02 04:50:44 +00:00
nate
7d39cad13f
Updating docblocks
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6421 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-01 02:03:04 +00:00
nate
18c2d9d446
Adding ModelBehavior::cleanup() callback for when behaviors are dynamically detached from models
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6420 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-01 00:56:22 +00:00
nate
423a56c958
Adding Model::attach() and Model::detach() for dynamic loading/unloading of behaviors + tests, fixes #4010
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6415 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-28 18:56:22 +00:00
nate
b9d3c4e2e8
Updating Model::saveAll(), adding tests. Fixes #3871
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6410 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-27 01:57:39 +00:00
nate
943eaf7549
Refactoring DboSource::fields(), updating column type handling in DboSqlite, fixes #3944 , using unquoted names to get column type in update queries, fixes #3917
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6398 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-21 02:21:28 +00:00
nate
4c6bbaffff
More Postgres abstraction/emulation fixes
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6387 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-17 17:09:10 +00:00
phpnut
520d179850
"Fixes #3876 , Associations do not work correctly in plugins"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6382 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-16 07:34:42 +00:00
nate
5e4a641003
Updating model test case and adding custom field support to Model::find('list'), closes #3802 (thanks GreyCells)
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6360 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-11 03:16:19 +00:00
nate
aa7ca4e703
Updating docblocks of deprecated methods, closes #3819 , closes #3878
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6357 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-10 19:50:33 +00:00
nate
cbd715618b
Removing MySQL-specific schema code from core, improving support for PostgreSQL sequences, most tests passing
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6355 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-10 08:44:38 +00:00
phpnut
68487baf47
"Fixes #3854 , Scaffolding is generating an id field with an empty value for auto_increment primary key"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6345 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-09 04:50:08 +00:00
phpnut
04934fdb2f
Reverting [6249] and [6250] this commit broke the working implementation.
...
Closes #3810
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6344 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-09 01:06:45 +00:00
nate
acd9cd5b8a
Fixing return value in Model::saveAll(), fixes #3852
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6337 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-08 10:21:25 +00:00
nate
b7abaf019c
Adding non-null association key fix in Model, and updating Model::isUnique() to account for current record, fixes #3859 , closes #2032
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6336 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-08 06:29:51 +00:00
phpnut
83b6be9d60
"Correcting line changed in error"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6319 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-03 19:41:06 +00:00
phpnut
6dec91a89f
"Fixes #3814 , Bug in hasAndBelongsToMany"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6317 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-03 18:50:59 +00:00
nate
6191c58f69
Fixing after filters for Model::find('list'), fixes #3805
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6315 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-02 23:07:54 +00:00
nate
7ea47e9893
Fixing Model::find('list') when using self-joins
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6304 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-02 02:30:19 +00:00
nate
695ac50fd7
Adding full join model support, closes #828 , closes #1845
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6299 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-01 23:57:17 +00:00
phpnut
852fa4e921
"Closes #3653 , Some optimization in code"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6297 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-01 22:28:47 +00:00
phpnut
cb53dc61b0
"Closes #2897 , Built-in file validation.
...
Implemented Validation::extension(); and Vaidation::range();
Updated copyright notices in all files"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6296 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-01 22:18:17 +00:00
nate
5abe66289d
Implemented 'counterCache' and 'counterScope' for belongsTo associations
...
Exempted 'created', 'updated' and 'modified' fields from whitelist when saving, closes #3720
Updated Model::bind(), closes #2355
Adding Model::saveAll() to save multiple records and associated records, closes #3615
Replacing Model::generateList() with Model::find('list'), deprecates Model::generateList()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6295 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-01 19:34:40 +00:00
phpnut
43e05117fa
"Closes #3602 , Model beforeFilter API doc update"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6294 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-01 18:34:55 +00:00
phpnut
1aa2324e8e
"Fixes #3786 , Missing keys when Model merges actsAs.
...
Added additional test for Set::merge();
Refactored Controller::_mergeVars."
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6292 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-01 01:07:24 +00:00
nate
72c80efa75
Fixes #3698 , no additional select performed in Model::deleteAll() if $callbacks and $cascade are false
...
Fixes #2146 , set 'foreignKey' => false and use association conditions to get custom join scoping
Fixes #3323 , set 'foreignKey' => false to disable default conditions
Fixes #3627 , added Model::$findQueryType to inform callbacks of the current find query type, i.e. 'count'
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6258 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-25 10:37:08 +00:00
phpnut
9c6f44006f
"Closes #3012 "
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6249 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-25 07:59:13 +00:00
phpnut
3935746a29
"Refactored Model::invalidFields() to pass array(field => value) back to custom validation methods in a model
...
Closes #1863 postal code validation for Italy and Germany
Closes #2766 , Add field name to params array for custom validation rules
Closes #3735 , Custom validation functions
Commented out the failing model tests until the missing fixtures are added
"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6243 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-25 04:53:15 +00:00
nate
586e93f59f
Adding 'last' validator option fix for Model::invalidFields()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6240 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-24 22:14:31 +00:00
nate
0d469ac4ba
Fixing ability to specify select fields for join models, and adding tests
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6230 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-23 17:03:19 +00:00
phpnut
4bad481735
"Fixes #3555 , model::deleteAll gives sql error when retrieving id's (postgresql)"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6214 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-23 07:43:31 +00:00
phpnut
27721cb730
"Fixes #3726 , Saving date, datetime, and time into database (form->input)"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6210 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-23 05:40:25 +00:00
phpnut
51baf42d62
"Changing Validation class to be a static class"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6203 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-22 21:03:30 +00:00
nate
c9f59b8713
Fixing LIMIT clause for Model::find('first') (Ticket #3754 )
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6178 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-20 14:36:39 +00:00
nate
cd8c26bda7
Allowing models to save empty records if they have a created, updated, or modified field (Ticket #3501 )
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6173 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-19 02:05:15 +00:00
phpnut
1e6665909b
"Fixes #3101 , Model::deconstruct() corrupting fields
...
Fixes #3726 , Saving date, datetime, and time into database (form->input)"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6148 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-14 04:21:58 +00:00
nate
e6cceba47f
Fixing warnings in Model::find('all') (Ticket #3712 )
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6139 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-10 03:28:21 +00:00
phpnut
8a2b51c3ec
"Removing all shortcut function usage from the core"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6128 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-08 06:08:03 +00:00
nate
d9f713fefc
Changing Model::$whitelist to filter fields in Model::save() instead of Model::set() (Ticket #3437 )
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6120 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-06 15:21:05 +00:00
phpnut
13bd58587a
"Correcting undefined index notice"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6117 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-03 16:04:29 +00:00
phpnut
3a58f3cab6
"Fixes #3681 , cascade has no effect"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6112 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-03 00:43:11 +00:00
phpnut
738449ee50
"Fixing Model::set() when null passed to first param, this was creating an empty keyed array"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6102 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-02 22:23:29 +00:00
nate
6a8c1474e0
Adding fix and updating test case for Model::find('count') (Ticket #3581 )
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6100 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-02 21:39:43 +00:00
gwoo
64e7390a6b
updating model habtm saving, check against current hatbm aliases
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6099 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-30 23:31:41 +00:00
phpnut
84b935506c
"Fixing return of data from Model::save() when a behavior alters the data removing saved content"
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6095 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-28 16:44:59 +00:00
nate
b2b654e7f5
Updating warning for Model::validates()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6087 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-26 19:48:46 +00:00
phpnut
c6f9c4bdb1
"Fixes #3589 , Model::deconstruct() undefined index notice with $data['meridian']
...
Fixed loading of classes in Model test"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6086 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-26 18:00:06 +00:00
mariano.iglesias
085982c5f8
Adding propagation of $cascade parameter (indicating if dependent records will be deleted as well) to beforeDelete callback at the Model and Behavior level
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6074 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-25 05:14:07 +00:00
phpnut
b0a1b18210
"Refactoring App class.
...
Added Configure::corePaths() to return paths to core library install.
Added additional tests for App::import()"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6019 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-18 07:18:25 +00:00
the_undefined
b3afc463ac
Added a new $altKey parameter to normalizeFindParams
...
Refactored the unit test for it and added more samples
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6018 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-18 06:14:27 +00:00
the_undefined
266d7ba738
Fixed test case for normalizeFindParams
...
Slightly refactored normalizeFindParams
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6017 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-17 23:31:15 +00:00
nate
6f38be85f4
Laying groundwork for Model::find() refactor code
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6015 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-17 22:46:55 +00:00
phpnut
f786c266c2
"Adding App::import for Overloadable class "
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6012 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-17 17:35:47 +00:00
phpnut
c000940e36
Closes #2119 Only define clone() in PHP4 when it hasn't been already defined.
...
Closes #2213 , Support multiple plugin paths.
Closes #2234 , filepaths to behavior classes should be cached in class.paths.php also
Closes #2345 , ability to group components into subfolders
Closes #2645 , Improvement to basic.php for class loading.
Fixes #3526 , Cache::write, when using just the config name, it fails.
Fixes #3559 , loading plugin model as assoc don't work.
Closes #3567 Controller Folders (Note this does not need routing to work, but controller names can not conflict with others in the same application so naming must still be unique)
Fixes #3579 , email.php component: Parse error with php 4.
Adding new class and file importer.
Updated most of the core to use the importer.
Added ClassRegsitry::init() that will create and instance of an object and store it in the registry.
Deprecated most of the load functions in basics.php
Plugin model loading now forces using the dot notation, to use models within a plugin, all the model associations must be in the PluginName.Model syntax, if this is not used, the plugin will look for the models in the main app/models directory first, if not found then it will search the plugin directories recursively until it finds a model.
var $belongsTo = array('SomeModel'); will look for some_model.php in the app/models
var $belongsTo = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
var $belongsTo = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php
The controllers of the plugin will still look for the default models inside the plugin if var $uses is not set:
var $uses = array('SomeModel'); will look for some_model.php in the app/models
var $uses = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
var $uses = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php
All of the above will work between plugins and main app
These changes also allow placing model and controllers is sub directories
Removed old class.paths.php file generation
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6001 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-16 09:35:19 +00:00
nate
858447a184
Fixing date/time inputs and removing dependency on Controller::cleanUpFields()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5965 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-08 00:05:12 +00:00
mariano.iglesias
53052452f7
Adding documentation for Model
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5949 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-05 03:36:12 +00:00
the_undefined
7e57a4d28b
Updated return value docblock for Model::save
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5941 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-03 17:55:30 +00:00
phpnut
6ab2b013bc
Initial refactoring of scaffold and bake.
...
Removing unused vars
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5917 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-29 03:04:08 +00:00
nate
8f12e402df
Fixing ACL test, misc ACL lookup optimizations
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5916 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-29 00:17:37 +00:00
gwoo
fbd3811cd1
removing usage of Model::loadInfo() replaced by Model::schema(), removing new lines at the end of some files, removed deprecated chmodr() function from basics, updated bake and scaffold views
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5912 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-28 04:18:18 +00:00
phpnut
19d99d13a0
Removing unneeded code in model::__generateAssociation();
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5906 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-27 05:29:11 +00:00
phpnut
f41aa80b78
Removing vars that are no longer used.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5904 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-27 01:32:17 +00:00
phpnut
8d6599c34b
Fixing bug for related records not being returned when using $recursive > 1.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5902 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-26 08:40:10 +00:00
phpnut
f57fc45d6f
Fixes #3455 , Secondary model array in model data causes corruption
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5898 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-25 02:53:54 +00:00
phpnut
06b7a1cc05
Fixing return of $success in Model::save()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5895 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 18:53:25 +00:00
phpnut
353eab91d5
Adding fix for lost data in Model::afterSave();
...
Closes #2465 , Model::save(); now returns the values of $this->data after a successful save;
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5894 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 17:44:27 +00:00
nate
076f780ed6
Updating Model::findNeighbours() to allow array conditions and field lists (Ticket #1176 and Ticket #3231 )
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5880 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-23 13:41:25 +00:00
phpnut
cb6a38abaf
Fixes #3430 , Query broken when model having associations linked to model has same alias to a different model
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5871 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 22:58:38 +00:00
mariano.iglesias
896f62544b
Changing @return int to @return integer and @param bool to @param boolean
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5860 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:54:36 +00:00
phpnut
160cd28440
Correcting @return int
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5858 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:11:12 +00:00
phpnut
da97a5c871
Correcting @return bool
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5857 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:09:35 +00:00
mariano.iglesias
897825d596
Adding documentation to classes belonging to Cake console.
...
Standarizing on datatypes used in phpdocblocs and removing unneeded @return types
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5851 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 05:52:20 +00:00
phpnut
7ca924d661
Closes #3362 , Changed self associated models so they no longer reference the single instance of the original model.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5845 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 02:11:58 +00:00
nate
c8b6269a64
Refactoring find*() methods into Model::find(), i.e. Model::find('all', array('conditions' => ...)), findCount()/find('count') results are no longer filtered
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5834 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-21 18:34:23 +00:00
phpnut
d923ffbd94
Reverting changes made to model.test.php in [5822]
...
Reverting changes made to model.php in [5815]
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5827 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-21 03:44:26 +00:00
nate
bc28d91b40
Changing Model::hasAny() to not query associations (Ticket #2816 )
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5825 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-21 03:32:23 +00:00
phpnut
e750c9d38f
Closes #3318 , When model calls invalidate, it would be usefull to use the __(messageID, true)
...
Fixes #2603 , Scaffold edit() should redirect to index() when no record is found.
Closes #2990 cake_sessions Needs A Database Name Setting, Configure::write('Session.database', 'default')
Closes #3120 , database - $config['encoding']; added new settings to database.php.default
Corrected errors when setting database configurations from console, would not allow changing setting on old configuration.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5815 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-20 10:14:30 +00:00
phpnut
5cb63a6460
Fixes #3418 , Model throws warnings when trying to save an empty array
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5804 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-19 21:05:34 +00:00
phpnut
34380bf243
Fixes #3411 , failing test when $data has more than one models data.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5789 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-19 03:33:19 +00:00
phpnut
a207a95893
Fixes #3187 and #3230 , Model -> save issue with fieldList and id
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5781 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-17 21:19:30 +00:00
phpnut
998ee569e7
Fixes #2902 , DB_ACL::allow allowing all when $actions is not an array.
...
Fixes #2988 , AclComponent check() does not inherit permissions.
Fixes #3022 , Inconsistent table alias quoting crashes Acl node lookup with PostgreSQL.
Fixes #3129 , Console ACL Shell ACO View Broken
Fixes #3176 , Problems with ACL support on Microsoft SQL Server.
Closes #3311 as invalid, DboSourceTest::testArrayConditionsParsing tests added
Fixes #3312 , DB_ACL::check() fail returning right permission
Fixes #3344 , Model->field adds incorrect condition under certain circumstances.
Fixes #3400 , Cookie Component: When reading a non-existing key it throws a notice.
Fixes #3407 , Since [5768] CookieComponent throws warning when used in beforeFilter().
Closes #3401 , Added form test to ensure $Form->fields array is what the security component requires.
Updated AclComponentTest
Merged changes in app/ to cake/console/libs/templates/skel
Fixed generated link to Run More Test after running Group > All tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5776 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-17 12:51:17 +00:00
gwoo
68c63b67f3
model and db_config task fixes
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5760 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-15 07:48:19 +00:00
gwoo
356fd587cd
updating exists, fixes #3368 , test added. thank you maular
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5733 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-08 17:43:14 +00:00
phpnut
e085cc9a27
Fixes #3357 , setSource not working
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5728 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-06 05:31:46 +00:00
gwoo
2ef118c3c4
replacing define CACHE_CHECK with Configure Cache.check, updating Model::exists()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5707 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-01 16:49:37 +00:00
gwoo
908f4c8a39
defining $fields in Model::loadInfo()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5699 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-09-28 10:04:25 +00:00
phpnut
dc76d14191
Correcting Model::invalidFields() isset would return false if $data[$fieldName] had been set to null, fixes issues with validating fields if their value had been set to null.
...
Merged changes from app to skel
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5677 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-09-20 22:45:00 +00:00
nate
09e64d075f
Implementing beforeValidate() behavior callback (Ticket #2818 ), and allowing $actsAs to be specified in AppModel
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5676 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-09-20 15:16:25 +00:00
nate
1791a378c0
Allowing behavior methods to be used in model validation (Ticket #3178 )
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5651 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-09-16 18:18:23 +00:00
mariano.iglesias
f433768806
Fixing double return
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5633 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-09-14 01:08:11 +00:00
phpnut
fdc575b107
Fixes #3140 , UUID char(36) primary key double insert bug
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5625 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-09-10 12:06:53 +00:00
phpnut
77a9e3dd22
Fixing fixtures.
...
Fixing setting of primaryKey when a model HABTM association is defined
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5614 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-09-03 04:48:58 +00:00
phpnut
f1de783295
Fixing bug when instances of an HABTM association was automatically created.
...
Deprecated using $this->(ModelName) if an associations is created with an alias.
example with alias: var $hasMany = array('Assoc' => array('className' => 'ModelName'));
correct usage: $this->Assoc->modelMethods();
example without alias: var $hasMany = array('ModelName');
correct usage: $this->ModelName->modelMethods();
Fixed instances of 'className' that was still used in the core.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5608 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-29 20:47:03 +00:00
phpnut
d20ddfeadc
Refactoring automatic model creations for HABTM associations
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5606 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-29 10:14:14 +00:00
phpnut
49275b8aee
Merging recent changes in 1.2 datasources into 1.1
...
Refactored Model::setSource() to remove unneeded code
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5596 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-29 00:16:13 +00:00
phpnut
0161f4f6d7
Fixes #3118 Prefix in models : can't use allow empty tablePrefix with a prefix defined in DATABASE_CONFIG
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5593 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-28 21:44:47 +00:00
gwoo
8bb67d9f6a
Adding Schema support, updated fixtures, deprecated loadInfo, changed Dbo::describe in all dbos, fixed tests,
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5563 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-21 21:46:59 +00:00
phpnut
eeeee7b49b
Implementing automatic UUID for primary keys if the field is CHAR(36).
...
Stripped out old code from NeatString.
Added String:uuid();
Renamed neat_string.test.php.
Added test for UUID generation.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5552 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-20 01:58:44 +00:00
nate
c3dc8cb827
Implementing automatic join models for HABTM associations, adding table prefix fix for Ticket #1965
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5522 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-14 23:12:24 +00:00
nate
1a690c48a4
Adding dynamic model creation to Model::__construct()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5488 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-04 17:20:50 +00:00
gwoo
d98ce2d5a3
changing findCount to return intval, #3009 .
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5487 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-04 16:13:48 +00:00
phpnut
549d86ac23
Refactoring dispatcher.
...
Added test for changes to Dispatcher.
Updating Model::_ _saveMulti(), moved the insert statement to DboSource::insertMulti() this will allow database that do not support multiple inserts in one statement to save data.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5460 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-07-25 04:38:28 +00:00
phpnut
cedf6993b2
Adding fix for #2869 , fixes count function not escaping "count" properly in pgsql
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5384 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-07-06 17:19:59 +00:00
phpnut
3880f9ce13
Refactoring Set::reverse() and Model::set()
...
Set::reverse() will now reverse the object to an array that was created in Set::map();
Added testMapReverse() to Set tests.
Removed code in Model::set() that was no longer needed
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5373 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-07-02 18:36:49 +00:00
mariano.iglesias
cd09a7c7dd
Adding option to group elements in Set::combine and making Model::generateList use Set::combine. Adding tests for Model::generateList and more tests for Set::combine
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5370 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-07-01 03:43:05 +00:00
phpnut
5e2b574e2f
Refactoring Model::set()
...
Added Set::reverse(0 to convert an object to an array
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5368 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-06-30 06:52:39 +00:00
mariano.iglesias
da2988a22b
Improving HABTM saving by getting rid of unneeded loop and escaping field names
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5367 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-06-28 17:31:26 +00:00