Commit Graph

167 Commits

Author SHA1 Message Date
Guy Sartorelli
dcc6863401
NEW Allow skipping validation on write (#11202) 2024-04-19 10:35:36 +12:00
Guy Sartorelli
357ed7ad7e
ENH Add generic types (#11108)
There are also a few general corrections to PHPDocs that I noticed along
the way (e.g. adding `|null` when the method is returning a null value.

There are some cases where either the return type or the whole PHPDoc
was duplicated from the parent class - in those cases I've simply
removed the duplication.
2024-01-17 17:08:26 +13:00
Guy Sartorelli
8b427f4e74
API Deprecate some unused API 2024-01-17 14:00:47 +13:00
Guy Sartorelli
c96f37ea93
Merge branch '5.1' into 5 2023-12-18 15:20:02 +13:00
Steve Boyd
db69a1f83c MNT Update @methods on class docblocks 2023-12-14 11:04:08 +13:00
Guy Sartorelli
c405ed6cf3
NEW Allow a single has_one to manage multiple reciprocal has_many (#11084) 2023-12-12 10:18:25 +13:00
Sabina Talipova
56511c8618 MNT Remove TODO comments 2023-10-30 13:21:09 +13:00
Steve Boyd
00cade0d38 Merge branch '5.0' into 5 2023-08-22 15:32:50 +12:00
Steve Boyd
ee0468e5b7 Merge branch '4.13' into 5.0 2023-08-22 15:32:38 +12:00
Thomas
d621d00eea
DBComposite::writeToManipulation() is never called 2023-08-11 09:56:37 +12:00
github-actions
613dc1620c Merge branch '5.0' into 5 2023-08-09 23:47:19 +00:00
Guy Sartorelli
15e4cbeb7a
Merge branch '4' into 5.0 2023-08-10 11:46:33 +12:00
Guy Sartorelli
5a52484d88
NEW Add FieldsValidator to ensure fields get validated 2023-08-08 13:02:27 +12:00
Guy Sartorelli
ae49e134a9
NEW Use custom list for eagerloaded relations (#10869) 2023-08-03 15:33:13 +12:00
Sabina Talipova
d24095aba8 FIX Image in summaryfields breaks search 2023-08-03 14:48:55 +12:00
Guy Sartorelli
3bf845a9e6
FIX Protect against loading incorrect eager-loaded relations.
Don't fetch eager-loaded has_many or many_many unless we've validated
that the relation IS actually a has_many or many_many relation.
Also clear eager-loaded relations when flushing the record.
2023-07-17 12:03:11 +12:00
Steve Boyd
46d7930489 ENH Cache DataObject::getSchema() 2023-06-28 11:11:43 +12:00
Steve Boyd
8cee451d41 Merge branch '5.0' into 5 2023-06-12 14:08:03 +12:00
Steve Boyd
cf77f06544 Merge branch '4' into 5.0 2023-06-12 14:07:24 +12:00
Bram de Leeuw
33c62033fe
Fix translation key for DataObject.GENERALSEARCH (#10805)
* MNT Use gha-dispatch-ci

* Update DataObject.php

Fix typo in GENERALSEARCH localisation

* Update en.yml

remove unnecessary localisation line

* Update nl.yml

remove unnecessary localisation line

* Update eo.yml

remove unnecessary localisation line

* Update ci.yml
2023-06-09 13:44:00 +12:00
Steve Boyd
246735101a NEW ORM eager loading 2023-06-07 14:59:02 +12:00
Steve Boyd
77301408d8 MNT Remove legacy upgrader config 2023-01-20 17:05:41 +13:00
Steve Boyd
c1a773310d ENH PHP 8.2 support 2022-12-21 14:44:47 +13:00
Sabina Talipova
53c0147f11
API Remove deprecated code (#10594) 2022-12-08 10:44:47 +13:00
Steve Boyd
ae4d7fa090 API Create orderBy() method to handle raw SQL 2022-12-07 12:25:58 +13:00
Sabina Talipova
a52c7795c7 Merge branch '4' into 5 2022-11-22 11:41:53 +13:00
Steve Boyd
137ebcebec API Stop using deprecated API 2022-11-15 18:20:54 +13:00
Steve Boyd
6e9d3ab632 Merge branch '4' into 5 2022-10-21 12:00:39 +13:00
Steve Boyd
9c453abf89 API Update deprecations 2022-10-13 14:49:15 +13:00
Steve Boyd
7b87926428 ENH Update deprecation messages 2022-10-13 14:05:49 +13:00
Guy Sartorelli
1bf86cf39f
API Revert shorten auto-generated table names (#10482)
* Revert "BUG Fix table name test"

This reverts commit b36a01a8fd.

* Revert "ENH shorten auto-generated table names"

This reverts commit 156f63bce3.
2022-09-02 10:55:45 +12:00
Steve Boyd
37ff4ee46a
Merge pull request #10454 from creative-commoners/pulls/5/rescue-master-table-name
API rescue master-branch PR: Shorten auto-generated table names #7621
2022-09-01 09:12:11 +12:00
Guy Sartorelli
715415d5c8
Merge branch '4' into 5 2022-08-31 13:37:25 +12:00
Andrew Aitken-Fincham
f2de39162d
API Allow dataobject get_one without passing a class
add class validation early in get_one()
2022-08-23 16:25:23 +12:00
Christopher Joe
156f63bce3
ENH shorten auto-generated table names
Fix add check for legacy long table name and rename to short version
2022-08-22 17:44:51 +12:00
Guy Sartorelli
10ef46a5ec
ENH Make DataObject::exists() an alias of DataObject::isInDB() (#10407) 2022-08-16 09:43:54 +12:00
Guy Sartorelli
11595952f4
NEW Search across multiple searchable fields by default (#10382)
* NEW Search across multiple searchable fields by default

* ENH Split search query and search each term separately.
2022-08-01 12:19:02 +12:00
Nicola Fontana
d65ba0d718 DOCS Fix DataObject examples 2022-07-15 06:48:59 +02:00
Steve Boyd
511b3bb060 ENH PHP 8.1 compatibility 2022-04-14 13:12:59 +12:00
Tyler Trout
6b1c5eb6d7
NEW Allow methods to be used for flexible searchable_fields (#10199)
* Allow methods to be used for flexible searchable_fields

* match_any key

* Documentation

* Update docs/en/02_Developer_Guides/00_Model/11_Scaffolding.md

Co-authored-by: GuySartorelli <36352093+GuySartorelli@users.noreply.github.com>

* Search fields test

* Newlines

* Update src/ORM/Search/SearchContext.php

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>

* Update docs/en/02_Developer_Guides/00_Model/11_Scaffolding.md

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>

* Removed comments and whitespace. Linting fixes

Co-authored-by: GuySartorelli <36352093+GuySartorelli@users.noreply.github.com>
Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
2022-02-10 09:40:16 +13:00
Nicolaas / Sunn Side Up
d1cac485b7
ENH Speed up DataObject::get_by_id by checking if there is an ID at all 2022-01-17 09:45:56 +13:00
Lukas
552cf5944d
MNT Fix various typos with codespell (#10177) 2021-12-13 21:05:33 +13:00
GuySartorelli
059d8aac0a
NEW Add afterUpdateCMSFields method to DataObject. (#9819) 2021-10-26 16:05:11 +13: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
8e803bbcfc FIX Parse Enums with dots in their values 2021-07-01 16:00:08 +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
9ca33950a2
API Add a CREATE_MEMORY_HYDRATED option to DataObject constructor (#9767) 2021-01-21 14:07:06 +13:00
William Desportes
c932d7e7fb
Fix the phpdoc blocks 2020-12-21 22:23:23 +01:00