From f4393f2c1000cb130f1429459a83fe146c9ad6aa Mon Sep 17 00:00:00 2001 From: JunYuan Yan Date: Tue, 7 May 2019 17:37:56 +0800 Subject: [PATCH 1/2] 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' ); } From e239edf99d7322938c49e4b1daf53b17bbb13df7 Mon Sep 17 00:00:00 2001 From: JunYuan Yan Date: Tue, 7 May 2019 21:15:26 +0800 Subject: [PATCH 2/2] update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a79b4891..7d97d2d1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unrelease] +### Fixed +- ORM :fix https://github.com/phpMv/ubiquity/issues/39 ### Fixed - Logging :fix https://github.com/phpMv/ubiquity/issues/31 ### Documentation