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
Mark Story
661fcd32ab
Fixing failing tests in PostgreSQL cause by invalid datatype comparisons and missing id fields.
2010-03-15 23:07:18 -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
3ab687043e
Updating DboPostgres test to reflect changes in test suite.
2010-03-14 19:27:36 -04: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
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
66a8910810
Fixing cakephp domain name.
2010-01-26 17:15:15 -05:00
Mark Story
527eec1a54
Fixing doc tags to make merge easier.
2010-01-26 16:51:53 -05:00
Mark Story
c195d654b3
Fixing TranslateBehavior test to run in php4.
2010-01-26 11:00:37 -05:00
José Lorenzo Rodríguez
03200440ed
Fixing TranslateBehavior and $tablePrefix. Closes #168
2010-01-24 18:27:08 -04:30
Mark Story
5d35fd8d38
Fixing issues in DboSource::defaultConditions() and DboSource::conditions() where doubly deleting a record from the beforeDelete and delete() could create incorrect conditions that would delete all records in a table. Fixes #250
2010-01-22 10:30:22 -05:00
Mark Story
8f2a4a1e0e
Merge branch '1.2' of github.com:cakephp/cakephp1x into 1.2
2010-01-14 20:28:00 -05:00
Mark Story
5c47d8dd7a
Trimming trailing whitespace from files. Refs #201
2010-01-14 20:15:54 -05:00
Joël Perras
15b8a3ec71
Updating copyright date on all files.
2010-01-13 23:47:14 -05:00
Mark Story
3c88d81735
Adding tests for model method validation with multiple parameters and addition of original validation rule to method params. Closes #149
2010-01-01 23:34:11 -05:00
Mark Story
a490e249fa
Adding test for validation of with models canceling a save.
...
Adding initial implementation of Model::__validateWithModel().
Correcting error in previous commit. Adding tests for saveAll and validating habtm with models.
2009-12-15 22:55:22 -05:00
Mark Story
02330b2d9c
Making DboSource::fields() accept an expression object. Fixes issues with sql parsing over quoting special SQL syntax.
...
Tests added
Fixes #66
2009-12-13 15:52:07 -05:00
mark_story
cc750d15f1
Adding test to disprove #385 . Proves saveAll with validate => first behaves correctly.
2009-12-04 14:39:12 -05:00
mark_story
2e0acbf505
Making habtm join conditions used by __saveMulti when finding link records to remove. It should be noted that having conditions on non-joinTable tables, and not having a model on the joinTable can cause SQL issues. Fixes #304
2009-11-22 17:56:46 -05:00
mark_story
6c3bcdd7e6
Removing commented code.
2009-11-22 17:34:11 -05:00
Juan Basso
71df8dbbba
Replace function sizeof (alias) by count.
...
Signed-off-by: Mark Story <mark@mark-story.com>
2009-11-21 13:50:57 -05:00
mark_story
d302ed1bfa
Fixing comment block formatting.
2009-11-13 09:44:51 -05:00
nate
1c8a2f232b
Changes Model::find() to allow modification of DataSource connection during callbacks.
2009-11-12 14:48:03 -05:00
mark_story
6db91b0f49
Fixing issues in ContainableBehavior that could leave models unbound when 'fields' was used as part of containment conditions. Fixes #253
2009-11-07 17:43:18 -05:00
ceeram
dd0c4a64c5
Test to prove ticket #253
2009-11-07 11:02:43 -05:00
mark_story
e609875754
Updating Model::invalidFields, so returning false from beforeValidate() will abort both the validation and saving() of the record.
...
Tests added to check beforeSave, beforeValidate, and beforeDelete return values.
Fixes #257
2009-11-04 12:36:17 -05:00
mark_story
5a093e5627
Fixing issues in postgres with time columns and '' values.
...
Tests added.
Fixes #213
2009-10-27 13:22:34 -04:00
mark_story
79fdd8b341
Adding test to ensure blob integrity. Disproves #199
2009-10-24 12:53:22 -04:00
mark_story
14bd47842c
Removing length() from DboMysqli, fixes incorrect float length parsing.
...
Test case added.
2009-10-24 11:06:27 -04:00
mark_story
0e23fdfbb3
Fixing infinitely nesting stack frames when TreeBehavior::reorder() is called and the models $cacheQueries = true and there are a sizable number of records being manipulated.
...
Test cases added.
Fixes #188
2009-10-21 00:22:36 -04:00
mark_story
3922f136da
Making DboMysqlTest pass when a connection with a prefix is used. Fixes #185
2009-10-19 20:54:02 -04:00
mark_story
a36c2ec5bb
Removing self inclusions for test cases. Refs #174
2009-10-16 09:21:33 -04:00
mark_story
3bf94e6a28
Updating documentation for Model methods to improve api parsing.
...
Removing redundant include.
2009-10-05 20:42:37 -04:00
mark_story
6dbba17d1b
Fixing issues with DboSource::execute() where queries would not be run if stats = false in the options. Tests added.
2009-09-30 00:37:06 -04:00
mark_story
bcb5e42aab
Adding test for previous commit.
2009-09-28 18:11:04 -04:00
jperras
4bf5244073
Adding tests for ConnectionManager, and fixing a missing return value for ConnectionManager::loadDataSource().
2009-09-24 16:26:56 -04:00
jperras
c48d9794f6
Fixing incorrect optional parameters passed to TreeBehavior::children() in TreeBehavior test case. Fixes errors & test failures when running under PHP 5.3.
2009-09-09 21:15:22 -04:00
jperras
5a432c6f71
Applying fix from Ceeram for updateAll joins on model relations with no foreign key. Fixes #69 .
2009-09-09 00:00:53 -04:00
jperras
2484179e36
DboMssql::value() now returns NULL for numeric column types (float, integer, binary) when the column data is empty. Fixes #28 .
2009-09-06 13:57:24 -04:00
renan.saddam
0e9007e060
Making sure we are not making non-uniques and non-primary keys index. Also changing basic fixture schema to make tests pass.
2009-09-02 22:07:58 -03:00
mark_story
cca3281f8c
Fixing complex expression handling in DboSource::fields(). Making AS a variable controlled by implementing dbo.
...
Test cases added.
Fixes #38
2009-08-19 13:03:36 -04:00
mark_story
303b488bc1
fixing doc block indentation.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8279 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-08-03 18:13:46 +00:00
mark_story
bab62df0d8
Fixing fails caused by PHP4 and all lowercase classnames.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8278 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-08-03 18:12:42 +00:00
gwoo
07d1ecdf6d
adding change to DboSource test that was not committed in [8267]
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8275 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-08-02 23:21:24 +00:00
renan.saddam
76e50ef625
Adding support for Model.* syntax, which translates to a list of fields from Model.
...
Fixing buildColumn for null values.
Fixing small containable merge, it was duplicating values, tests added.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8265 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-31 02:08:20 +00:00
renan.saddam
90445e9119
Fixing "DEFAULT NULL" sentence, which for some reason does not work. It needs to be only "NULL", and "DEFAULT NULL NULL" works too.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8263 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-30 00:00:19 +00:00
renan.saddam
ee8d12c939
Fixing issue with "DEFAULT NULL NULL" generated by buildColumn.
...
Making the tests pass by just changing the start and end quotes.
Providing "created" values for CakeTestFixtureTestFixture Fixture.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8262 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-29 22:30:20 +00:00
jperras
9d7b560817
Splitting model tests into separate files to allow more fine-grained test running.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8255 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-24 22:17:14 +00:00
nate
a75d1fad2a
Modifying quoting method used in conditions with array values in DboSource, fixes #6519
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8243 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-22 01:50:11 +00:00
mark_story
fb6b16c467
Fixing empty time value handling in Model::deconstruct(). Both null and 00:00:00 are valid values now. Test cases added and refactored. Fixes #6488 , #6018 , Refs #5659
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8225 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-08 03:25:30 +00:00