diff --git a/Classes/Domain/Model/Visitor.php b/Classes/Domain/Model/Visitor.php index ca280b0c..99c449ad 100644 --- a/Classes/Domain/Model/Visitor.php +++ b/Classes/Domain/Model/Visitor.php @@ -48,9 +48,12 @@ class Visitor extends AbstractModel protected ?ObjectStorage $categoryscorings = null; /** + * @Lazy * @var ?ObjectStorage + * @phpstan-var ObjectStorage|LazyLoadingProxy|null + * Todo: Type can be changed to Company|LazyLoadingProxy|null when PHP 7.4 is dropped */ - protected ?ObjectStorage $fingerprints = null; + protected ?object $fingerprints = null; protected string $email = ''; protected string $company = ''; @@ -240,7 +243,9 @@ public function increaseCategoryscoringByCategory(int $value, Category $category public function getFingerprints(): ?ObjectStorage { - return $this->fingerprints; + return $this->fingerprints instanceof LazyLoadingProxy + ? $this->fingerprints->_loadRealInstance() + : $this->fingerprints; } /** diff --git a/ext_tables.sql b/ext_tables.sql index 9c27987f..b6ff7b0a 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -41,7 +41,6 @@ CREATE TABLE tx_lux_domain_model_visitor ( PRIMARY KEY (uid), KEY parent (pid), KEY frontenduser (frontenduser), - KEY fingerprints (fingerprints(20)), KEY identified (identified), KEY blacklisted (blacklisted), KEY email (email(20)), @@ -81,6 +80,7 @@ CREATE TABLE tx_lux_domain_model_fingerprint ( PRIMARY KEY (uid), KEY parent (pid), + KEY visitor (visitor), KEY value (value(33)), KEY domain (domain(50)), KEY user_agent (user_agent(50)),