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