Commit graph

115 commits

Author SHA1 Message Date
nate
67d7579fda Adding tests for auto-constructing hasAndBelongsToMany associations, disproves #3859
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6431 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-03 06:40:15 +00:00
nate
acfc38e57d Fixing XML support in Model and Set classes
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6427 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-02-02 20:45:37 +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
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
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
nate
c8974be887 Refactoring fixture handling and Model tests, fixing UPDATE and DELETE queries for other databases, fixes #3794. Only forcing 'test_suite' prefix on default database connection, fixes #3873
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6361 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-11 06:45:00 +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
phpnut
3b2e24d6ef "Adding test cases from #3810"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6343 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-09 01:04:14 +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
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
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
gwoo
7e845242d5 updating set handling of xml and adding tests for model saving xml
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6274 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-29 20:24:10 +00:00
nate
4d68d6c6dd Adding fixtures for 'with' association tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6245 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-25 05:35:37 +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
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
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
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
78b1452fca Adding assertions to model test case
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6134 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-08 09:01:14 +00:00
nate
c2db2a3936 Adding test case for Model::saveField() (Ticket #3687)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6131 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-08 08:22:20 +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
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
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
nate
fed7d601a2 Updating test cases
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5910 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-27 20:33:52 +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
mariano.iglesias
9b57b59c28 Specifying an array of IDs in second model data to replicate #3455
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5896 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 22:08:19 +00:00
phpnut
7b914bab9f Correcting tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5893 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 17:04:14 +00:00
mariano.iglesias
6591c8f79b Adding test for #3455 replicating issue, Secondary model array in model data causes corruption
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5892 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 16:29:50 +00:00
mariano.iglesias
34a7d667db Adding secondary data for testCreationWithMultipleDataSameModel
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5891 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 16:17:53 +00:00
mariano.iglesias
ec76d6aac3 Changing names for instance vars in test added for #3455
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5890 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 16:10:20 +00:00
mariano.iglesias
28b7fb5653 Reenabling disabled tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5889 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 16:07:36 +00:00
mariano.iglesias
8b7e01552c Adding another test for #3455, Secondary model array in model data causes corruption
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5888 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 16:06:00 +00:00
mariano.iglesias
304bc01a9d Adding test for #3455, secondary model array in model data causes corruption
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5884 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 03:32:34 +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
phpnut
89185ace25 Adding ClassRegistry::flush() to reset the registry
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5868 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 20:58:55 +00:00
mariano.iglesias
aaca183da1 Adding test case for #3430, where different belongsTo bindings that use same class but different alias name in various models would break under certain circumstances
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5865 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 20:20:48 +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
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
mariano.iglesias
cfc6a21316 Adding test that thows failing behavior with null values when calling Model::set()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5822 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-20 21:09:24 +00:00
phpnut
7ebb27fccc Fixes #2982, TreeBehavior::verify, non-portable SQL, badly quoted conditions
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5806 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-19 21:43:48 +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
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
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