From 5ff2cff7a50a8bed979488780b55c63515c30d4e Mon Sep 17 00:00:00 2001 From: Rafael Armenio Date: Thu, 22 Jul 2021 18:39:26 -0300 Subject: [PATCH] LazyLoad --- composer.json | 3 ++- src/ORM/Entity.php | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/ORM/Entity.php diff --git a/composer.json b/composer.json index bfae42d..e8029e5 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,8 @@ "zendframework/zend-paginator": "^2.7", "cakephp/orm": "3.*", "cakephp/cache": "3.*", - "cakephp/log": "3.*" + "cakephp/log": "3.*", + "jeremyharris/cakephp-lazyload": "2.*" }, "require-dev": { "squizlabs/php_codesniffer": "^3.5.3" diff --git a/src/ORM/Entity.php b/src/ORM/Entity.php new file mode 100644 index 0000000..faf388d --- /dev/null +++ b/src/ORM/Entity.php @@ -0,0 +1,22 @@ + + * + * @link http://github.com/armenio + */ + +namespace Armenio\Cake\ORM; + +use Cake\ORM\Entity as VendorEntity; +use JeremyHarris\LazyLoad\ORM\LazyLoadEntityTrait; + +/** + * Class Entity + * + * @package Armenio\Cake\ORM + */ +class Entity extends VendorEntity +{ + use LazyLoadEntityTrait; +}