diff --git a/src/TDBMCannotLazyLoadInheritanceException.php b/src/TDBMCannotLazyLoadInheritanceException.php new file mode 100644 index 00000000..284c59ec --- /dev/null +++ b/src/TDBMCannotLazyLoadInheritanceException.php @@ -0,0 +1,19 @@ +assertSame(TDBMObjectStateEnum::STATE_LOADED, $country->_getStatus()); // This is failing } + public function testGetByIdLazyLoadFailsOnInheritance(): void + { + $this->expectException(TDBMCannotLazyLoadInheritanceException::class); + $this->expectExceptionMessage('Failed to lazy load the tables (person, contact, users) as they are part of inheritance.'); + $userDao = new UserDao($this->tdbmService); + $userDao->getById(1, true); + } + private function skipOracle(): void { if (self::getConnection()->getDatabasePlatform() instanceof OraclePlatform) {