File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public function create($data) : Entity
3333 foreach ($ this ->getMapper ()->getPlugins () as $ plugin ) {
3434 $ entityClass = $ plugin ->getEntityClass ($ this ->space , $ data );
3535 if ($ entityClass ) {
36- if ($ class != Entity::class) {
36+ if ($ class !== Entity::class && ! is_subclass_of ( $ class , Entity::class) ) {
3737 throw new Exception ('Entity class override ' );
3838 }
3939 $ class = $ entityClass ;
@@ -256,7 +256,7 @@ public function getInstance(array $tuple) : Entity
256256 foreach ($ this ->getMapper ()->getPlugins () as $ plugin ) {
257257 $ entityClass = $ plugin ->getEntityClass ($ this ->space , $ data );
258258 if ($ entityClass ) {
259- if ($ class != Entity::class) {
259+ if ($ class !== Entity::class && ! is_subclass_of ( $ class , Entity::class) ) {
260260 throw new Exception ('Entity class override ' );
261261 }
262262 $ class = $ entityClass ;
You can’t perform that action at this time.
0 commit comments