Sergey Shevchenko
e68e65badc
feat: added config value to force certain behaviour & added a note to the docs
2021-12-08 11:18:00 +13:00
Sergey Shevchenko
2c9ba8bc45
fix: conform with linter
2021-12-08 11:18:00 +13:00
Sergey Shevchenko
62725a5db3
fix: added exception for MariaDB
2021-12-08 11:18:00 +13:00
Sergey Shevchenko
5e26757a9e
Merge branch 'silverstripe:4' into 4
2021-11-15 22:07:11 +13:00
Loz Calver
20134e6a4f
NEW Add FirstPage() and LastPage() to PaginatedList ( #10129 )
2021-11-08 09:26:21 +13:00
Sergey Shevchenko
04b7ad51b8
Merge branch 'silverstripe:4' into 4
2021-11-01 13:12:59 +13:00
GuySartorelli
059d8aac0a
NEW Add afterUpdateCMSFields method to DataObject. ( #9819 )
2021-10-26 16:05:11 +13:00
Mo Alsharaf
2c1ef4df23
MNT Update URL in docs for ICU documentation ( #10118 )
2021-10-15 11:28:16 +13:00
Michal Kleiner
38fe326262
MNT Fix minor typos
2021-09-25 00:23:43 +12:00
Michal Kleiner
1e5414eac7
FIX Use correct ancestor class when querying for stage and live children
...
The right ancestor class that has the Hierarchy extension applied needs to be used
since it doesn’t have to be the class directly extending from DataObject, which means
the ID and ParentID columns might be in different tables.
2021-09-25 00:23:43 +12:00
Matt Peel
f99ba5d716
NEW Add extension point to DataObject->hydrate()
2021-08-25 16:07:02 +12:00
GuySartorelli
cacd762357
Avoid "new" keyword to instantiate CompositeValidator
...
The CompositeValidator is Injectable, so we should allow project code to replace it here via the Injector.
2021-08-02 12:46:53 +12:00
Steve Boyd
f6e8d6e591
Merge branch '4.8' into 4
2021-07-07 14:03:02 +12:00
Steve Boyd
87d076faa6
FIX Cast DBInt value to int
2021-07-06 16:43:54 +12:00
Steve Boyd
8e803bbcfc
FIX Parse Enums with dots in their values
2021-07-01 16:00:08 +12:00
Steve Boyd
9463aaf571
Merge branch '4.8' into 4
2021-06-08 11:49:01 +12:00
David Peck
28b5b803be
FIX Defensively copy mocked datetime
2021-06-05 16:46:19 +12:00
Michal Kleiner
2017a20433
FIX Use empty array as a fallback for preg_split within dbtext summary
...
If the content is invalid for whatever reason e.g. when instantiating
a DBText field to get a summary of text through
`DBField::create_field('Text', $content)->Summary(10)`, preg_split returns
false and the rest of the code expects an array.
This tweak ensures an array is always returned even when preg_split fails.
2021-06-02 15:17:58 +12:00
Steve Boyd
a3df66860f
Merge branch '4.8' into 4
2021-05-31 17:05:11 +12:00
Steve Boyd
9ccdb8efb2
Merge branch '4.7' into 4.8
2021-05-31 17:04:54 +12:00
Maxime Rainville
472fc4ebb4
BUG Update DataQuery::exists to return false when limit causes no result to be returned ( #9946 )
...
* BUG Update DataQuery::exists to return false when limit causes no result to be returned
* Update comment
* Fixing linting issue
2021-05-31 16:50:58 +12:00
Sam Minnee
c7c6bdebdf
FIX: Allow join-object to be referenced as a component
...
This avoids having arbitrary differences between a join object and a
has-one relation.
2021-05-20 20:32:25 +12:00
Maxime Rainville
6fc25e4e96
RFC Add chunk method to DataList to iterate over large dataset ( #8940 )
2021-04-14 07:49:44 +12:00
Nicolaas
2ecd8b34ee
adding use SilverStripe\Security\Member; to make sure linting works
...
adding `use SilverStripe\Security\Member;` to make sure that linting works.
2021-04-01 23:36:36 +13:00
Nicolaas
504e20320e
Update DBBoolean.php ( #9893 )
2021-03-24 12:05:33 +13:00
Joe Harvey
33365b92f3
Bug Fix - Ensure DataQuery::exists() SQL is both valid MySQL and T-SQL
...
The original SQL statement is not valid T-SQL for use with SQL Server
2021-02-08 17:22:20 +00:00
Maxime Rainville
9ca33950a2
API Add a CREATE_MEMORY_HYDRATED option to DataObject constructor ( #9767 )
2021-01-21 14:07:06 +13:00
3Dgoo
d1cca0f3fb
Fix DataQuery::exists() not working correctly
...
Fixes `DataQuery::exists()` not working correctly in some cases as discussed in #9809
2021-01-20 17:03:36 -08:00
Steve Boyd
ed5c1488c8
Merge pull request #9817 from creative-commoners/pulls/4/fix-dbcomposite-indexspecs
...
FIX DBComposite getIndexSpecs method
2021-01-17 11:18:35 +13:00
Ingo Schommer
6153f441ee
Merge branch 'phpdoc-fixes' into 4
2021-01-14 11:08:22 +13:00
Serge Latyntcev
2f64667bd6
FIX DBComposite getIndexSpecs method using self API to get the list of db fields
2021-01-07 16:19:54 +13:00
3Dgoo
3b74c2596f
Fix DataQuery::exists() not working correctly
...
Fixes `DataQuery::exists()` not working correctly in some cases as discussed in #9809
2020-12-29 16:45:58 +10:30
William Desportes
c932d7e7fb
Fix the phpdoc blocks
2020-12-21 22:23:23 +01:00
Steve Boyd
5be045f9a2
FIX Bug when specifying 0 in ArrayList::offsetSet
2020-12-15 14:50:10 +13:00
Steve Boyd
af933e8226
MNT Double quote yaml string, fix phpcs warnings
2020-11-30 11:37:35 +13:00
Guy Marriott
b0762593da
Merge branch '4.6' into 4.7
2020-11-17 15:46:54 -08:00
Damian Mooyman
5d45bbdd0d
Update src/ORM/DatabaseAdmin.php
...
Co-authored-by: Guy Marriott <guy.the.person@gmail.com>
2020-11-13 11:48:50 +13:00
Damian Mooyman
2753516783
Fail over if calling deprecated method
2020-11-13 08:27:53 +13:00
Damian Mooyman
405a1f7cb6
ENHANCEMENT Better optimised class name migration with substantially fewer queries
...
Fixes #9752
2020-11-12 16:10:28 +13:00
Sergey Shevchenko
51402a9c42
fix: don't use int width for mysql > 8.0.17 #9453
2020-10-29 10:54:52 +13:00
Steve Boyd
6e77d5eada
NEW DataObject related objects service
2020-10-29 09:29:26 +13:00
Bernard Hamlin
f00f64120d
NEW Allow setting sql_mode via config ( #9721 )
2020-10-22 15:01:30 +13:00
Robbie Averill
4d54a2110f
Update spaces in syntax, single quotes, early returns where possible
2020-10-01 17:36:14 -07:00
Robbie Averill
ae1e17edec
Update exception assertions in tests and remove deprecated annotations
2020-09-25 10:06:49 -07:00
Robbie Averill
27bd5d12e3
ENH Replace E_USER_ERROR errors with exceptions
2020-09-24 23:51:21 -07:00
Dan Hensby
ae0ece2b02
Merge pull request #9665 from creative-commoners/pulls/4/php8-fqcn-token
2020-09-18 20:44:22 +01:00
Sam Minnee
0d7c5a9ece
NEW Add/remove callbacks on RelationList
...
This provides a mechanism for adjusting the behaviour of these
relations when building more complex data models.
For example the following example has a status field incorporates a
Status field into the relationship:
```php
function MyRelation() {
$rel = $this->getManyManyComponents(‘MyRelation’);
$rel = $rel->filter(‘Status’, ‘Active’);
$rel->addCallbacks()->add(function ($relation, $item, $extra) {
$item->Status = ‘Active’;
$item->write();
});
}
```
Introduces a new library dependency: http://github.com/sminnee/callbacklist
2020-09-18 13:33:42 +12:00
Steve Boyd
015ea8cfc8
Merge branch '4.6' into 4
2020-09-11 11:54:23 +12:00
Robbie Averill
de61681dec
Merge pull request #9634 from open-sausages/pulls/4/ellipsis
...
BUG Use proper ellipsis character in the various summary method.
2020-09-10 14:48:33 -07:00
Maxime Rainville
acdebcdba7
Fix unit test
2020-09-10 17:08:13 +12:00