mark_story
2fa2de441f
Updating the doc block for Datasource::delete()
...
Fixes #2054
2011-10-05 22:10:14 -04:00
mark_story
c143908a03
Change how floats are formatted in MySQL.
...
Fixing precision issues where numbers would get truncated.
Also maintaining compatibility with scientific notation.
Fixes #2049
2011-10-05 21:53:52 -04:00
mark_story
a6e4208bdd
Fix Controller::paginate and ordering with virtualFields.
...
Model::isVirtualField() does ensure that model names match the current model.
This creates false positives when doing sorting datasets when an associated
model has a field with the same name as a virtualField.
Fixes #1822 . Fixes #1756 .
2011-10-04 22:52:28 -04:00
mark_story
d489d490a6
Moving 'joins' key conversion into DboSource::buildJoinStatement()
...
Having this in Model felt like the wrong layer for it to reside.
This also simplifies a few things internally.
Refs #1517
2011-09-27 22:43:06 -04:00
Ceeram
6afa21cb18
find with joins option now respects prefix set in database configuration, fixes #1517
...
test to prove validity of ticket #1517
2011-09-27 22:43:06 -04:00
José Lorenzo Rodríguez
f57f7305f5
Merge pull request #212 from j15e/1.3
...
Fix to defect model virtualfields with mysqli
2011-09-23 07:17:07 -07:00
Jean-Philippe Doyle
af36429342
Fix to defect model virtualfields with mysqli
...
Refs #2017
2011-09-23 09:59:45 -04:00
Yosuke Basuke Suzuki
eef87ee74c
Bug fixed. saveAll with validation option "only" or "first" works wll.
...
saveAll() did set null foreign key when it just validates. I've
assigned numeric validation on the hasMany side model and validation
did fail with this behavior. I've changed this not to set foreign key
when it just validation.
2011-09-23 16:27:15 +09:00
An M - kub2
26495b36d1
Fix incorrect formation of query string
...
removed on ALTER COLUMN xx TYPE xxx for postgres.
Fixes #1967
2011-09-16 21:20:06 -04:00
mark_story
77b3e63293
Removing AFTER in Postgres add column.
...
It causes SQL errors on Postgres 8.4
2011-09-16 21:13:21 -04:00
Renan Gonçalves
707c0b4130
Fixed bug in CakeSchema where it determines the field position.
...
- Respective tests were added.
- Schema files will now have 'after' => 'previous_field' on it.
2011-09-16 15:08:22 +02:00
hirata
e86ae43796
Fix SQL when using operator SIMILAR TO
...
Fixes #1979
2011-09-08 20:18:12 -04:00
mark_story
ac0b2b8280
Applying patch from Daniel Feinberg for Containable
...
Removes __backContainableAssociation as its not needed and causes
more problems than it solves.
Fixes #1762
2011-09-07 20:39:12 -04:00
mark_story
b1c4b57d85
Updating doc comment about find(list).
...
Refs #1968
2011-09-06 08:00:08 -04:00
Jelle Henkens
53d221c3d1
Fixing bug where scientific notations were not passed to mysql in their original form which resulted in loss of precision
2011-09-05 01:41:38 +01:00
ADmad
762fcf2c42
Fixed TreeBehavior::childCount(). Closes #1833
2011-07-31 01:07:46 +05:30
mark_story
e1960d1d35
Changing Postgresql to use DELETE FROM instead of TRUNCATE.
...
This should improve compatibilty with databases using constraints.
Fixes #1838
2011-07-28 22:17:12 -04:00
Mark Story
3189872ea9
Adding early return when connection to MySQL or MySQLi fails.
...
Fixes #1732
2011-06-25 12:00:05 -04:00
Graham Weldon
b22fdeae77
Add doc block for CakeSchema::_noPrefixTable
2011-06-01 11:29:27 +08:00
Graham Weldon
169b0a5c3f
Consolidate table prefix removal.
2011-06-01 00:38:09 +08:00
Graham Weldon
c5d763773c
Added test for datasource prefixes.
...
Fixed another instance of error in prefix replacement in CakeSchema.
2011-05-31 23:40:29 +08:00
Graham Weldon
52b90872df
Fixed schema reading where table name contains the datasource prefix.
2011-05-31 18:29:26 +08:00
Juan Basso
6aca8dc11a
Updating the copyright to 2011.
2011-05-30 22:46:14 -04:00
mark_story
efbb6479fc
Fixing issues in DboSource::group(), which always expected an optional argument.
...
Fixes #1656
2011-05-20 21:10:30 -04:00
mark_story
3a7f44e04c
Updating the doc blocks for TreeBehavior::moveup/movedown to indicate that
...
number can be either an integer or a boolean.
Fixes #1655
2011-04-19 21:02:33 -04:00
mark_story
6cc1688d4e
Fixing issue where DboMysql would perform joins on delete queries even if the conditions did not require joins. Added a more intelligent join detector, that removes joins if all the conditions are simple. This will only be able to optimize array conditions.
...
Test cases added. Fixes #1571
2011-03-24 23:25:56 -04:00
mark_story
532555b94b
Fixing order condition quoting to allow fields with - in them. Fixes #1599
2011-03-24 22:28:11 -04:00
Ceeram
e9011badb5
Ensure both node() and afterSave() use ->name
...
Fixes #1564
2011-02-28 21:43:33 -05:00
mark_story
8d5e68d582
Fixing issue where habtm tables would not have the connection prefix removed when generating schema. Fixes #1180
2011-02-05 11:19:05 -05:00
mark_story
71d8e744f1
Fixing case-sensitivity of AS in fields. Tests added. Fixes #1474
2011-01-26 20:58:16 -05:00
mark_story
d192ed32f0
Adding a socket key to DboMysqli::$baseConfig. Fixes notice errors when socket is undefined. Fixes #1482
2011-01-26 20:54:14 -05:00
mark_story
32f0b20a33
Removing wonky and most likely incorrect manipulation of socket and port
...
setting mangling in DboMysqli. Fixes #1478
2011-01-24 22:05:16 -05:00
mark_story
ed7f8d1906
Fixing issue where DboPostgres used the wrong type for boolean columns with a default of false or true.
...
Added a test case.
Changing Model::create() so it doesn't wipe out default values === false.
Fixes #1460
2011-01-21 13:31:33 -05:00
mark_story
f893e3b63b
Applying patch from 'ryandesign' fixing incorrect datetime formats. Fixes #1441
2011-01-11 20:16:42 -05:00
mark_story
04929ae1df
Applying patch from 'Thorsten Buss'.
...
Fixes issues in DboSource, where mismatching types on join columns could result in incorrect query generation.
Fixes #708
2010-12-21 20:40:19 -05:00
mark_story
15ca2400bc
Fixing issue in DboSource::name() where special characters in column names would not be correctly quoted.
...
Tests added.
Fixes #1264
2010-11-25 06:52:23 -05:00
mark_story
bf10723f89
Applying patch from 'michealc' to fix duplicated comments. Fixes #1306
2010-11-22 21:21:55 -05:00
mark_story
e8678b38ac
Adding specific conditions to model->delete's call to dbo->delete. This
...
helps fix a race condition where dbo->defaultConditions could cause
additional data loss. Fixes #250
2010-11-08 21:50:45 -05:00
ADmad
eb76ab95f2
Fixed issue where Model::saveAll() would incorrectly commit a transaction which was not started in that function call itself.
2010-11-06 09:33:50 +05:30
Mark Story
e6aeae8935
Fixing issue where value in difference array was always the string value instead of the original value.
2010-10-31 22:44:45 -04:00
mark_story
f5fd069583
Applying patch from 'Justas Butkus' to fix CakeSchema::compare()
...
Fixes issues with comparing null == '' and adds a new protected method to handle null aware array difference generation.
Tests added.
Fixes #1206
2010-10-27 23:03:31 -04:00
mark_story
7c296211ef
Making generating schema for connections with prefixes work correctly. The prefix needs to be removed so that when tables are created or updated they do not get the prefix added twice.
...
Moving tests around. Fixes #1180
2010-10-20 23:17:04 -04:00
mark_story
498417203b
Making DboSource::fields() use cacheMethod() so it respects $cacheMethods.
...
Test added.
Fixes #1211
2010-10-20 22:28:31 -04:00
mark_story
d56416456c
Applying patch from 'Justas Butkus' to DboSource
...
Fixes issues where reconnect could issue warnings related to
array_merge. Fixes #1182
2010-10-11 21:52:10 -04:00
mark_story
5e26d282a1
Fixing connection specific schema generation
...
Fixing missing table errors when reading schema for specific connections.
Tests updated to check that tables not on a connection are never touched. Fixes #1106
2010-09-30 23:22:57 -04:00
mark_story
c573fd0432
Fixing issue where a beforeDelete() could trigger a table truncation.
...
Moving the exists check below beforeDelete() and behavior->beforeDelete() so any records deleted in the callbacks will not exist when db->delete() is called. Test updated. Fixes #250
2010-09-29 23:31:41 -04:00
mark_story
b08aba8e86
Adding a missing rollback when validation on an associated record fails, and validate = first. Fixes #1147
2010-09-28 23:37:28 -04:00
mark_story
a4746c7227
Applying patch from 'kworr' to reorder the switch in DboPostgres::value() to fix issues with pgsql 9.0. Fixes #1139
2010-09-24 22:47:18 -04:00
mark_story
8cd266c77f
Correcting example in doc block. Fixes #1132
2010-09-24 22:23:24 -04:00
mark_story
729a45703b
Fixing issue where table names with spaces would not be quoted by name(). Fixes #1121
2010-09-21 20:34:27 -04:00