File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ public function getChanges(): array
133133
134134 public function getClassSpace (int |string $ class ): int |string
135135 {
136- if (!is_integer ($ class ) && class_exists ($ class )) {
136+ if (!is_integer ($ class ) && ! ctype_lower ( $ class ) && class_exists ($ class )) {
137137 if (!array_key_exists ($ class , $ this ->classNames )) {
138138 $ this ->registerClass ($ class );
139139 }
Original file line number Diff line number Diff line change @@ -48,6 +48,18 @@ public function testClassBased()
4848 $ this ->assertEquals ($ row , $ mapper ->findOne ('constructor ' ));
4949 }
5050
51+ public function testAttribute ()
52+ {
53+ $ mapper = $ this ->createMapper ();
54+ $ attribute = $ mapper ->createSpace ('attribute ' );
55+ $ attribute ->addProperty ('key ' , 'string ' );
56+ $ attribute ->addProperty ('value ' , 'string ' );
57+ $ attribute ->addIndex (['key ' ]);
58+
59+ $ attribute = $ mapper ->findOrCreate ('attribute ' , ['key ' => 'tester ' ]);
60+ $ this ->assertNotNull ($ attribute );
61+ }
62+
5163 public function testIdleField ()
5264 {
5365 $ mapper = $ this ->createMapper ();
You can’t perform that action at this time.
0 commit comments