From f4393f2c1000cb130f1429459a83fe146c9ad6aa Mon Sep 17 00:00:00 2001 From: JunYuan Yan Date: Tue, 7 May 2019 17:37:56 +0800 Subject: [PATCH] small patch for fix [ORM] model Table annotation #39 --- src/Ubiquity/annotations/TableAnnotation.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Ubiquity/annotations/TableAnnotation.php b/src/Ubiquity/annotations/TableAnnotation.php index a24b78694..240ff5e31 100644 --- a/src/Ubiquity/annotations/TableAnnotation.php +++ b/src/Ubiquity/annotations/TableAnnotation.php @@ -22,6 +22,8 @@ public function initAnnotation(array $properties) { if (isset ( $properties [0] )) { $this->name = $properties [0]; unset ( $properties [0] ); + } else if (isset ( $properties ['name'] )) { + $this->name = $properties ['name']; } else { throw new \Exception ( 'Table annotation must have a name' ); }