Ber Clausen
2f24de81cb
Model objects should be in CamelCase.
...
Add a Model type hint.
2013-12-10 00:18:18 -03:00
Mark Story
19122414fc
Merge pull request #2459 from bar/2.5-patch
...
Test for self join only when needed.
2013-12-09 18:55:31 -08:00
Ber Clausen
b7527c6c3b
Test for a self join only when needed.
2013-12-09 23:11:42 -03:00
Ber Clausen
2366e7c7b5
Make getConstraint() a tiny bit more readable.
2013-12-09 22:25:03 -03:00
mark_story
97ab2c0e9b
Merge branch 'imsamurai-2.5' into 2.5
...
Add unsigned integer support to MySQL. Unsigned integers have not been
added to other databases as they either do not support them (postgres,
sqlserver) or they are 'faked' and don't do anything (sqlite).
Fixes #2321
2013-11-27 20:12:28 -05:00
José Lorenzo Rodríguez
df5fc2304a
Merge pull request #2289 from bar/2.5-optimize-dbosource
...
First part of the DboSource cleanup.
2013-11-21 01:02:36 -08:00
ADmad
dda6080579
Merge branch 'master' into 2.5
2013-11-19 00:27:12 +05:30
imsamurai
7bc8dac453
fix phpcs errors
2013-11-14 02:19:41 +02:00
imsamurai
2fcb4c3c6c
- change check to strict for options
of $fieldParameters
...
- add `types` parameter and strict check if it present in `$fieldParameters` (if it present and not contain column type field parameter will be skipped)
- add `noVal` parameter to `$fieldParameters` if it present and not empty value of this parameter from column will be ignored
- add `unsigned` column type for integer, float and biginteger. If it set to `true` an 'UNSIGNED' will be add in sql column part, if not set or set not to `true` this parameter will be skipped
2013-11-14 01:11:30 +02:00
Marc Würth
7cfa0116f4
Removed "PHP 5" from file header DocBlocks
...
This statement does not serve a purpose anymore.
In a long forgotten world it indicated the main version number of PHP which the code in the file was compatible to.
http://pear.php.net/manual/en/standards.sample.php
But since PHP 5.1 and later this is only marginally true.
Thus I propose to remove it from CakePHP.
2013-11-13 22:58:39 +01:00
Ber Clausen
ed142d8c89
Add missing type hints.
2013-11-13 00:09:45 -03:00
Ber Clausen
0e74a0757a
Keep insertQueryData() DRY, issue less lookups. Remove unused $assocData
...
and $LinkModel from the signature.
Model objects should be CamelCase.
2013-11-13 00:09:39 -03:00
Ber Clausen
52d425737a
Call getDataSource() instead of the directly calling
...
ConnectionManager::getDataSource().
2013-11-12 03:38:47 -03:00
Ber Clausen
c1f3d9c274
Model objects should be in CamelCase.
2013-11-12 01:37:38 -03:00
Ber Clausen
014d2dd2d9
Remove 'self' key from getConstraint() calculations because it is not necessary anymore.
2013-11-12 01:30:57 -03:00
Ber Clausen
e658e071d1
Remove unused variable from the signature.
2013-11-12 01:17:11 -03:00
Ber Clausen
67a65663a7
Assign before actually using it.
2013-11-12 01:13:55 -03:00
Ber Clausen
026565033b
Model objects variables should be CamelCase.
2013-11-12 00:49:06 -03:00
Ber Clausen
6b8a79be6d
Remove reference from the signature.
2013-11-12 00:29:36 -03:00
Ber Clausen
cb42b056ac
Remove the 'Line indented incorrectly' PHPCS error.
2013-11-12 00:08:39 -03:00
Ber Clausen
7f570f33e4
Unindent, and remove unnecessary getDataSource() call.
...
Also, objects should be CamelCase.
2013-11-12 00:01:18 -03:00
Ber Clausen
b35c9671ad
Explicitly build SQL statements, calling buildAssociationQuery().
2013-11-11 23:27:50 -03:00
Ber Clausen
f0fcaa1305
Improve generateAssociationQuery():
...
* bail early when $linkModel is Null (BC for now).
* move SQL fields warmup and SQL statement building to its own functions
(it will payoff later improving self documentation and readability).
* make assignments and function calls only when needed (depending on the
association type).
2013-11-11 23:27:50 -03:00
Ber Clausen
dcadfcbcab
Remove inline assignment.
2013-11-11 23:27:50 -03:00
Ber Clausen
53c6df554c
Remove unused $resultSet argument from generateAssociationQuery().
2013-11-11 23:27:50 -03:00
Ber Clausen
5da05d9216
Remove unneeded test inside conditional.
2013-11-11 23:27:50 -03:00
Ber Clausen
f16695db5f
Move variables to logical blocks.
...
Unindent to ease readability, and avoid assigning variables when
unneeded.
Free a little memory before entering to recursive intensive loops.
2013-11-11 23:27:50 -03:00
Ber Clausen
fdb4b11d0b
Remove unnecessary call to getDataSource().
2013-11-11 23:27:50 -03:00
Ber Clausen
c9e0131d6a
Only generate query data for hasOne and belongsTo associations.
...
Avoid calling generateAssociationQuery():
* when the return value will never be usefull (True in this case)
* to avoid polluting $queryData with uneeded fields
Later, the SQL statement for the primary, and 'hasOne' plus 'belongsTo'
relationships, is built.
2013-11-11 23:27:50 -03:00
Ber Clausen
2532228844
Improve readability and optimize minimizing variable lookups.
2013-11-11 23:27:49 -03:00
Kim Egede Jakobsen
18e0dc95dd
Remove @return from docblock (for __construct && __destruct methods)
2013-11-11 14:54:48 +01:00
ADmad
d9ca148499
Merge branch 'master' into 2.5
...
Conflicts:
CONTRIBUTING.md
lib/Cake/Model/Model.php
lib/Cake/VERSION.txt
2013-10-30 02:34:09 +05:30
mark_story
a098ff28b8
Update doc block and remove inline assignment.
2013-10-29 12:32:20 -04:00
Robert Sworder
940a51b5fa
Update definition of an empty model.
2013-10-25 15:12:03 +01:00
Frank de Graaf
ab89f6ec97
Makes DboSource less string dependent.
2013-10-22 16:43:32 +02:00
Jose Lorenzo Rodriguez
9673048c30
Merge branch 'master' of github.com:k-halaburda/cakephp into k-halaburda-master
2013-10-12 01:03:20 +02:00
José Lorenzo Rodríguez
8cdbafd312
Merge pull request #1631 from ovidiupruteanu/patch-2
...
flushMethodCache not working if called before cacheMethod
2013-10-11 15:56:19 -07:00
Andy Hobbs
0f7d6a90a1
Ticket 4108
...
- Added schemaName to DboSource::fields() method cache key to fix bug with changing schema name
2013-09-26 11:56:14 +01:00
Bryan Crowe
7d7954ce18
Replaced all is_a() calls with instanceof operator
2013-09-24 21:08:06 -04:00
euromark
653aed7701
is_a() to instance of - completes PR 1669
2013-09-24 22:57:51 +02:00
ovidiupruteanu
f416a321c7
flushMethodCache not working if called before cacheMethod
...
When calling flushMethodCache it correctly empties self::$methodCache but if cacheMethod is called afterwards self::$methodCache gets populated with data from the Cache.
2013-09-12 22:02:39 +03:00
euromark
959988cfa1
Remove last yoda conditions as per coding standards guidelines.
2013-09-06 18:36:57 +02:00
mark_story
6a6371b2d4
Fix CROSS JOINs
...
While seldomly used, CROSS joins should not generate invalid SQL.
Fixes #4050
2013-09-05 12:45:48 -04:00
mark_story
0f2d59d987
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Network/CakeResponse.php
lib/Cake/TestSuite/CakeTestCase.php
2013-08-18 23:10:08 -04:00
euromark
6cf147e8c8
unify null checks - avoid method call in favor of strict check
2013-08-16 20:12:49 +02:00
mark_story
26769edd04
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Utility/CakeTime.php
lib/Cake/VERSION.txt
2013-08-12 14:39:02 -04:00
mark_story
6ce10b28c9
Update doc blocks.
2013-08-12 14:37:43 -04:00
k-halaburda
74eb32696a
Some more space / tabs issues [Travis PHPCS=1 fail]
2013-08-09 11:51:19 +02:00
k-halaburda
2655d16c13
Fixed tabbing in some places
2013-08-09 11:17:12 +02:00
k-halaburda
3855c0690e
Fixed tabing formating
2013-08-09 10:26:44 +02:00