Commit graph

390 commits

Author SHA1 Message Date
Ceeram
9ce75e6fd6 No need to get the datasource if column is defined in schema. Fixes #5712 2015-01-22 00:46:55 +01:00
antograssiot
c2f298a8b7 Replace our custom code fence with markdown standard fence 2015-01-09 13:47:25 +01:00
mark_story
4d6611b328 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-12-17 21:38:32 -05:00
euromark
e1c128bb99 Consolidate with conditions sniff. 2014-12-09 03:17:35 +01:00
mark_story
ad2d6edda9 Merge branch 'master' into 2.6 2014-12-06 21:28:59 -05:00
Guy Warner
327fcb4846 Fix some missed doc block issues 2014-11-30 14:50:11 -07:00
Guy Warner
fb61d9393b Add @trigger doc blocks of methods triggering CakeEvent 2014-11-30 14:45:40 -07:00
mark_story
decce4daf2 Merge branch 'master' into 2.6 2014-11-14 21:25:09 -05:00
watermark
8712dc01df Cleanup of isUnique
isUnique takes the count of the args multiple times.  Store the count in a variable to cut down on overhead.
2014-11-11 16:13:16 -05:00
mark_story
0e4fb9d648 Merge branch 'master' into 2.6 2014-11-07 15:13:46 -05:00
mark_story
dac8b7b644 Update return type for Model::saveField().
Fixes #5086
2014-11-05 20:37:43 -05:00
euromark
768f2c809c Correct doc block return types. 2014-11-05 13:03:27 +01:00
mark_story
87fcc9f0b9 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-10-13 21:11:38 -04:00
mark_story
50b3893e65 Make rule sniff less complicated and tidy up doc block.
Refs #4871
2014-10-13 17:59:31 -04:00
Rachman Chavik
dcb605c700 Possible fix for isUnique backward compatibility 2014-10-13 19:46:10 +07:00
mark_story
39011cd9d8 Fix Model::isUnique() not working as a validator.
While it *did* work for single fields, isUnique could not be used to
validate the uniqueness across multiple fields as documented. Because
validation methods pass arguments in an order the validator did not
expect the validation method would not work correctly.

Fixes #4571
2014-10-09 22:49:17 -04:00
suzuki86
e4c0dee6ee Fix small typo 2014-10-08 23:37:38 +09:00
ADmad
3fb252ad2f Merge branch 'master' into 2.6 2014-09-13 00:37:16 +05:30
euromark
04ef39217f Take care of more int casts. 2014-09-10 16:29:23 +02:00
José Lorenzo Rodríguez
b5bfbfcf15 Merge pull request #4223 from chinpei215/2.6-issue2529-fix
Fix different format of $results in afterFind
2014-09-03 10:39:37 +02:00
mark_story
7c316bbc56 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/basics.php
2014-08-30 21:28:11 -04:00
Jeremy Harris
2dac6d29c2 Clearing HABTM (unique) when HABTM array is empty, refs #2461 2014-08-28 17:52:13 -05:00
chinpei215
c246695518 Fix different format of $results in afterFind
Refs #2529

As of this commit, we can get consistent format of $resutls in afterFind.
And we can keep backward compatibility if Model::$useConsistentAfterFind is set to false.
2014-08-11 01:19:40 +09:00
mark_story
9c3089796f Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Model/Model.php
2014-08-08 23:28:06 -04:00
chinpei215
cb376bf420 Add some more transaction tests
And remove 2 else clauses.
2014-08-03 22:34:11 +09:00
chinpei215
799500ce6d Fix transactions do not get rollbacked in saveAssociated/saveMany
Refs #2849
2014-08-02 10:12:33 +09:00
Ceeram
02b8bce641 Fix cs error introduced after resolving merge conflict with master to 2.6 2014-07-21 14:01:43 +02:00
mark_story
051d78c1a5 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Model/Model.php
2014-07-16 23:11:58 -04:00
chinpei215
ace30fdd8a Fix a race condition problem
Prevents Model::save() from generating a query with WHERE 1 = 1 on race condition.

Refs #3857
2014-07-12 23:27:39 +09:00
mark_story
9fd1a51a52 Merge branch 'master' into 2.6 2014-07-10 14:39:32 -04:00
David Yell
79be5e6805 Update Model.php
Fixed the case on the link to the book, to match the anchor in the page.
2014-07-10 10:46:48 +01:00
mark_story
3a70d9c033 Merge branch 'master' into 2.6 2014-07-09 10:17:05 -04:00
mark_story
765be87d88 Overwrite the schemaName property if it is not defined in the class.
If a model class does not define a schemaName we should use the
datasource's schemaName. We can assume that people using schemaName want
to lock the model onto a specific schema given the changes in #3210

Fixes #3720
2014-07-03 21:53:54 -04:00
ADmad
e410501791 Fix CS errors. 2014-07-03 23:13:55 +05:30
mark_story
2bcd817367 Merge branch 'master' into 2.6 2014-07-03 11:13:06 -04:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
mark_story
8e14b2f807 Merge branch 'master' into 2.6 2014-06-11 23:05:59 -04:00
ADmad
1d40f3e685 Fix API docblock CS errors. 2014-06-05 00:28:55 +05:30
Haithem BEN GHORBAL
31615ce415 add 'atomic' option to "save()" API
This commit adds a transaction context to 'save()' API in order to rollback
possible modifications done in some 'Model.beforeSave' listener callback.
This will allow cakephp 2.x to behave like 3.0 .
It uses try/catch to better handle transaction.
Previous save() API is renamed to protected _doSave() method.
A new save() method is created for transaction handling.
'atomic' option is disabled for internal 'save()' call.
2014-06-03 09:37:17 +02:00
Haithem Ben Ghorbal
35c2a7ef31 restore previous (erroneous ?) behaviour 2014-05-29 02:36:13 +02:00
Haithem Ben Ghorbal
67af8b37db clean code and remove unneeded checks 2014-05-28 23:53:47 +02:00
Haithem BEN GHORBAL
d4a0883cb9 fix typo/coding style 2014-05-28 18:31:03 +02:00
Haithem BEN GHORBAL
a8e410ee20 fix save with habtm returning false 2014-05-28 18:17:16 +02:00
Mark Story
9c9d45596f Merge pull request #3478 from Schlaefer/#3303-lengthBetween
closes #3303 RFC: Rename Validator::between() into Validator::length()
2014-05-24 16:48:05 -04:00
Schlaefer
4848b63189 closes #3303 RFC: Rename Validator::between() into Validator::length() 2014-05-13 09:31:03 +02:00
mark_story
89cd114e6f Merge branch 'master' into 2.5 2014-05-12 14:30:02 -04:00
Stephen Cuppett
ed83df5bed Fixes #3469, explicit isset check for counterCache 2014-05-11 19:17:18 -04:00
ADmad
d466e00644 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
	lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
	lib/Cake/Utility/Folder.php
	lib/Cake/VERSION.txt
2014-05-04 14:35:36 +05:30
euromark
7a287a6942 More coding standard corrections. 2014-04-29 14:19:33 +02:00
mark_story
de0062de77 Merge branch 'master' into 2.5 2014-04-25 22:10:02 -04:00