Commit graph

1359 commits

Author SHA1 Message Date
Mark Story
0c29fd0094 Merge remote branch 'origin/1.2' into 1.3
Conflicts:
	cake/libs/cake_session.php
	cake/libs/controller/components/session.php
	cake/libs/model/model.php
	cake/libs/router.php
2010-03-27 11:48:49 -04:00
José Lorenzo Rodríguez
41734503a6 Merge branch '1.3' of git@github.com:cakephp/cakephp1x into 1.3
* '1.3' of git@github.com:cakephp/cakephp1x:
  Supporting Model.* syntax on postgres.
  Changing variable $title to $title_for_layout. Closes #511

Conflicts:
	cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php
2010-03-25 16:08:58 -04:30
José Lorenzo Rodríguez
1f1324f500 Qouting fields inside postgres functions when prepended a DISTINCT, closes #512 2010-03-25 16:05:45 -04:30
renan.saddam
dd4ad2f83d Supporting Model.* syntax on postgres. 2010-03-25 17:33:34 -03:00
ADmad
e2113e4aa2 Minor optimization in DboSource::__scrubQueryData(), removing unneded isset() check. 2010-03-18 03:02:58 +05:30
ADmad
6a723bb515 Type casting conditions array to avoid warning during array merge in Model::_deleteDependent(). Fixes #477 2010-03-18 02:51:55 +05:30
José Lorenzo Rodríguez
0f876e1a1b Merge branch 'saveAll' into 1.3
* saveAll:
  Making saveAll() behave like plain save() when suplied empty data array, closes #277
2010-03-17 16:40:26 -04:30
José Lorenzo Rodríguez
5c186d4430 Making saveAll() behave like plain save() when suplied empty data array, closes #277 2010-03-17 15:19:30 -04:30
José Lorenzo Rodríguez
28cb57a92c Fixing bug in Model::escapeField() where it would return the wrong string id the datasource's name method returs the unmodified string.
Tests added. Closes #473
2010-03-17 10:32:36 -04:30
AD7six
bc990f41e3 Prevent sql error for uuids if id is specified as null
if the primary key is present in the data to be saved as null - prevent
passing the same key (id) twice and therefore triggering an sql error.

Signed-off-by: Mark Story <mark@mark-story.com>
2010-03-16 22:57:37 -04:00
José Lorenzo Rodríguez
c1f74c28ae Fixing postgres self join error 2010-03-16 16:49:57 -04:30
Mark Story
8375570f8a Removing useless loop in Model::save() 2010-03-15 23:36:20 -04:00
AD7six
0c951b7248 Prevent sql error for uuids if id is specified as null
if the primary key is present in the data to be saved as null - prevent
passing the same key (id) twice and therefore triggering an sql error.

Signed-off-by: Mark Story <mark@mark-story.com>
2010-03-15 23:32:46 -04:00
Mark Story
4861da66ed Merge remote branch 'origin/1.2' into 1.2-merger
Conflicts:
	cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php
2010-03-15 23:26:24 -04:00
Mark Story
01a5738f3c Effectively reverting changes made in
[190066fd51] which caused conditions using
a falsey values to be removed.
2010-03-15 23:14:23 -04:00
Mark Story
ea64588a81 Adding tests from 'Stephen Cuppert' to test incorrectly generate DELETE queries for habtm join tables that do not have a primary key when using PostgreSQL. Updating DboSource::_matchRecords() to only query the table if the supplied conditions are actually multi-table conditions. Fixes #459 2010-03-15 22:55:14 -04:00
Mark Story
190066fd51 Adding array_filter() to remove empty conditions that can be caused by array casting an empty string. 2010-03-15 22:15:03 -04:00
Mark Story
5e665b32f2 Removing useless condition in DboSource::cacheMethod() 2010-03-15 00:41:44 -04:00
Mark Story
daf02cad61 Fixing CakeSchema index comparison that was causing failures in postgres tests. 2010-03-14 23:31:52 -04:00
Mariano Iglesias
1120d0daff Fixing issue in Containable where if bindModel was used to add / change a binding not permanently, Containable was making the change permanent 2010-03-14 16:37:50 -03:00
Mariano Iglesias
8d58b40642 Fixing issue in Containable where if bindModel was used to add / change a binding not permanently, Containable was making the change permanent 2010-03-14 16:34:57 -03:00
Mark Story
32432e8de6 Updating DboSource::conditions() to use cacheMethod(). Refs #458 2010-03-13 23:00:08 -05:00
Mark Story
c059cf5175 Implementing cacheMethod(). Helps to solve #458, as it provides features to control and clear method caches. 2010-03-13 22:55:18 -05:00
Mark Story
028668b7a6 Adding condition for counterCache update keys. Fixes issues where counter cache wouldn't be updated. Fixes #450 2010-03-13 00:18:51 -05:00
José Lorenzo Rodríguez
cbcd394d0b Fixing alter schema queries generated for Postgres, which dos not support altering column type, nullable and default value at the same time 2010-03-09 16:09:16 -04:30
Dieter Plaetinck
a79ff508a6 fix compliancy with more elaborate ORDER syntax, such as "DESC NULLS FIRST" in postgresql, in DboSource::order() 2010-03-09 14:12:54 -04:30
Mark Story
63fcd225ac Fixing doc block @link tags in Model class. 2010-03-05 22:07:39 -05:00
Dieter Plaetinck
3affec58c6 move information about return value to the correct place in the doc block of Model::saveAll()
Signed-off-by: Mark Story <mark@mark-story.com>
2010-03-05 21:47:03 -05:00
Mark Story
ba06b5b456 Moving call to _getConnectionObjects() inside class_exists check. Removes errors when creating a connection with no DATABASE_CONFIG class. 2010-03-05 21:37:28 -05:00
José Lorenzo Rodríguez
e4a5ca528c Fixing virutal fields fetching for postgresql, closes #417 2010-03-05 16:07:59 -04:30
Mark Story
3e275494e1 Removing duplicated condition from merge. 2010-03-03 20:07:23 -05:00
Mark Story
ec5d9729b0 Model::find(first) no longer uses the id set in a model as the default conditions. Fixes #266 2010-02-27 11:32:29 -05:00
José Lorenzo Rodríguez
6ae54fda8d Using the method cache for the rest of the return statements in DboSource::name 2010-02-23 10:09:11 -04:30
Mark Story
7075aa5e86 Fixing DboSource not quoting table/field names with - in them. Tests expanded . Fixes #323 2010-02-20 11:42:17 -05:00
Mark Story
6a3347ef7c Merge remote branch 'origin/1.2' into 1.2-merger
Conflicts:
	cake/VERSION.txt
	cake/config/config.php
	cake/console/libs/tasks/model.php
	cake/dispatcher.php
	cake/libs/l10n.php
	cake/libs/model/datasources/dbo_source.php
	cake/libs/view/pages/home.ctp
	cake/tests/cases/console/libs/tasks/model.test.php
	cake/tests/cases/libs/view/helpers/ajax.test.php
	cake/tests/cases/libs/view/helpers/text.test.php
2010-02-20 01:32:04 -05:00
renan.saddam
63f7900ba1 Checking if the last query returned a error, tests added. Fixes #72. 2010-02-17 22:31:00 -03:00
Mark Story
eb96f4ac3a Minor refactor of ConnectionManager::__connectionData(). Uses pluginSplit() now to consolidate plugin dot notation handling. 2010-02-16 22:42:06 -05:00
Mark Story
2279b1a736 Adding patches, and tests from tkykmw. Add support for plugin datasource drivers. Fixes #297 2010-02-16 22:35:16 -05:00
Mark Story
fc499ac48f Reversing order of short cut checks. Fixes issues in PHP 5.1.x. Fixes #351 2010-02-16 22:05:50 -05:00
renan.saddam
d7b49e3494 Not forcing the use of ds, so will use $useDbConfig instead, tests added. Fixes #324. 2010-02-15 14:46:18 -03:00
Mark Story
0ce14ceb7e Adding return statement, preventing infinite loops when no default fields are bound, and unbindTranslation() is called with no fields. Fixes #307 2010-02-11 22:03:43 -05:00
Joël Perras
2c1e6de7d6 Another fix for array_values() throwing a warning when using Tree Behavior under certain
situations.
2010-02-05 13:18:46 -05:00
Mark Story
7daad4acaf Merge branch '1.2' of github.com:cakephp/cakephp1x into 1.2 2010-02-02 20:39:25 -05:00
Joël Perras
205c95ef65 Fix array_values() warning when using Tree Behavior under certain
situations.

In TreeBehavior::_setParent(), if the $Model->find('first') returned
false, then array_values() would throw a warning.
2010-02-02 11:48:57 -05:00
José Lorenzo Rodríguez
3f9813a9ec Removing unused statement, thanks jrbasso 2010-01-29 16:15:03 -04:30
Mark Story
7fb7c5ebf6 Merge branch '1.3' of github.com:cakephp/cakephp1x into 1.3 2010-01-29 11:56:09 -05:00
Mark Story
887ddb9575 Adding tests for deletion of multiple habtm associations. Reverting changes made in [15518b8c9a] that caused incorrect removal of links when deleting records. Fixes #247 2010-01-29 11:55:18 -05:00
Mark Story
7cfb5aba8d Minor refactor of Model::_deleteLinks to improve readability. 2010-01-29 11:21:37 -05:00
José Lorenzo Rodríguez
1dd0a6470c Optimizations for DbouSource.
Now the result for some methods is stored in a memory cache inside the poperty $methodCache
2010-01-29 10:57:40 -04:30
Juan Basso
57997e770c Refactory of DboSource::name() to improve performance. Added more tests to it.
Signed-off-by: Mark Story <mark@mark-story.com>
2010-01-27 12:24:06 -05:00