Commit graph

442 commits

Author SHA1 Message Date
Ceeram
b913fe5303 better error message in MissingConnectionException when driver is not enabled 2012-06-23 11:42:26 +02:00
Ceeram
cf18e8d38b avoid unneeded query in delete() 2012-06-19 16:08:36 +02:00
Jose Lorenzo Rodriguez
111a23274e Fixing yet another issue related to beforeValidate and
validateAssociated
2012-06-06 10:07:01 -04:30
Ceeram
048dc8d254 casting schema to array, fixes error for array_keys when return is null 2012-06-02 01:39:53 +02:00
Jelle Henkens
e5eb7b490e Preventing cache collisions by adding the the datasource key 2012-06-01 10:42:26 +01:00
Jelle Henkens
18b335a605 Replacing crc32 with md5 for less collisions in method caching 2012-06-01 10:42:26 +01:00
mark_story
0bfcd49249 Fix unbindTranslation not unbinding.
There were documented use cases that have never worked.  Fix that.
Also rename a method so it better describes what it does.

Fixes #2913
2012-05-27 21:25:55 -04:00
mark_story
b27a3aab7b Set session.gc_maxlifetime by default.
In the default case of using files for sessions, files could
be garbage collected earlier than expected based on other session
settings.  Always set session.gc_maxlifetime so session files are
garbage collected correctly.

Fixes #2901
2012-05-23 22:25:19 -04:00
Jose Lorenzo Rodriguez
16847b0d97 Backporting changes form 2.2 to fix some edge cases on deep saving. Fixes #2879 2012-05-19 21:14:23 -04:30
Ceeram
7dbd6bc3a2 make sure model data is moved to alias, even when first key in data is assoc model
add extra tests for saveAll and validate first
ensure db values dont get reset to default values
2012-05-19 14:41:16 -04:30
Jose Lorenzo Rodriguez
b54dc69f64 Making validateAssociated overwrite data consistently with validateMany 2012-05-10 00:52:54 -04:30
Jose Lorenzo Rodriguez
6da2fe8323 Ugly hack to fix saveAll deep and beforeValidate callbacks changing model data 2012-05-10 00:47:35 -04:30
Jose Lorenzo Rodriguez
00a34f14fe Added warning messages in doc block for validateMany and validateAssociated about first param being passed by reference 2012-05-10 00:07:05 -04:30
Jose Lorenzo Rodriguez
0fb025f6dc Fixing error with validateMany and validateAssociated not saving values altered in beforeValidate callbacks 2012-05-09 23:51:27 -04:30
Jose Lorenzo Rodriguez
12ae03b876 Revert "Merge pull request #644 from nodesagency/hotfix/beforeValidate-copy-data"
This reverts commit 0f54758e5a, reversing
changes made to b4a42e4a03.
2012-05-09 17:58:08 -04:30
Jose Lorenzo Rodriguez
07bf73e88f Revert "Merge pull request #643 from nodesagency/hotfix/beforeValidate-copy-data"
This reverts commit b4a42e4a03, reversing
changes made to 6bd7da36e7.
2012-05-09 17:57:48 -04:30
Christian Winther
e8fce37a65 Fixing saveMany 2012-05-09 23:59:02 +02:00
Christian Winther
3b154fa325 Another fix for Pull request 642 2012-05-09 23:34:37 +02:00
Christian Winther
45a86a8b20 Copy changes made to $this->data in beforeValidate callbacks back to saveAssociated data variable
This allow changes in beforeValidate to be saved
2012-05-09 22:57:21 +02:00
mark_story
fbba3621b5 Fix additional issues with saveAll().
Fixes #2857
2012-05-07 21:36:28 -04:00
mark_story
6c5255ac73 Fix saving translate records with saveAll()
Also fixes issues saving translated data with validation
disabled.  By enabling data backup in beforeSave() and beforeValidate()
the existing behavior is preserved, and the current issue is fixed.

Fixes #2857
2012-05-06 22:48:15 -04:00
mark_story
128c719bd0 Add no-op method to base class.
Fixes #2839
2012-04-30 20:52:17 -04:00
Kyle Robinson Young
b8488b8dfe Update 1.x @link in docblocks 2012-04-26 19:49:18 -07:00
Ceeram
f0bd7386e2 created, modified and updated fields now use static timestamp in testcases 2012-04-21 17:38:49 +02:00
Ceeram
388b20dd9d fix error in previous commit 2012-04-17 00:22:13 +02:00
Ceeram
a84597784d avoid warning when saveAll() data has empty hasMany data, fixes #2792 2012-04-16 22:46:58 +02:00
Ceeram
9556ff714d Avoid running validation again, when saveAll() is called with 'validate' => 'first' 2012-04-16 09:45:44 +02:00
mark_story
d136fac219 Correct docs to match code.
Fixes #2790
2012-04-15 20:33:43 -04:00
Mark Story
6167529d4d Merge pull request #605 from shama/patch-datasource-test
Add checks for startQuote & endQuote.

Fixes #2769
2012-04-14 08:08:05 -07:00
mark_story
b9389c9da1 Fix comment's reference to version numbers. 2012-04-14 10:50:31 -04:00
mark_story
2fd15b6c7e Revert removal of session_cache_limiter()
It was removed in [4a6159c9af].
The session_cache_limiter() is required for IE8 to correctly
hold onto sessions.

Fixes #2781
2012-04-14 10:04:56 -04:00
Kyle Robinson Young
6cf73c763c Tests for a generic custom datasource
Default startQuote and endQuote to avoid error with non-database datasources
2012-04-11 10:08:45 -07:00
mark_story
2333c8f33f Re-factor duplicated code. 2012-04-10 21:05:42 -04:00
Mark Story
da9cbcf7bb Merge pull request #603 from luisarmando/queryCacheDoc
Fix doc of DboSource->$_queryCache.
2012-04-09 14:35:57 -07:00
Luís Armando
bb2286bc43 Fix doc of DboSource->$_queryCache. 2012-04-09 13:30:58 -03:00
Ceeram
30268f6a08 Only check for existing method expresion() when it actually will be called.
Datasources that use calculate() should not be forced to implement expression() as well
2012-04-05 23:15:18 +02:00
mark_story
5c590aad09 Add missing ClassRegistry import.
Fixes #2757
2012-04-05 08:33:12 -04:00
ADmad
1cc5206442 Merge branch '2.1-dbosource' into 2.1 2012-04-04 19:58:48 +05:30
ADmad
93639a7c43 Fixed bug where associated model's afterfind was not triggered in particular case 2012-04-04 19:48:37 +05:30
Ceeram
d2098828c6 Fix fullTablename(), ensure prefix prepending is only skipped when not on position 0 in tablename. Fixes #2750 2012-04-04 15:07:45 +02:00
ADmad
7ed90c72ae Updating API docblock for Model::query() 2012-04-03 19:06:41 +05:30
Ceeram
34a730dfd8 ensure buildJoinStatement() does not add schemaname when table value is a subquery, fixes #2709 2012-04-02 18:48:02 +02:00
mark_story
4e67698506 Fix issues with SQLServer + boolean columns.
SQLServer should not have lengths applied to BIT column types.
Remove any length that could have been provided.

Fixes #2439
2012-04-01 22:10:05 -04:00
Kyle Robinson Young
e2a46f76c7 substr() optimizations 2012-03-28 13:07:26 -07:00
dogmatic69
7c697eb9be adding an extra check to only type cast if its a int/true/false so you can still use fields etc in the queries 2012-03-23 21:21:18 -04:00
Ceeram
817015e6b3 remove unneccesary elseif 2012-03-23 16:37:02 +01:00
Ceeram
4a6159c9af session_cache_limiter() removed, it was set to invalid value as well
Also remove setting P3P header
2012-03-23 16:31:26 +01:00
Kyle Robinson Young
21c4967cc6 App::uses the File Utility as write() uses File 2012-03-22 23:48:57 -07:00
mark_story
20bdf1d7b0 Add escaping to table names.
SQLite was not quoting table names, so tables with
keywords caused errors.

Fixes #2702
2012-03-21 21:04:34 -04:00
Ceeram
4dfbfe9c8b fix saveAll deep option, when associated data is empty, or has deeper associated model data as first key in array 2012-03-21 10:38:04 +01:00