Commit 273feae 1 parent c519345 commit 273feae Copy full SHA for 273feae
File tree 2 files changed +13
-1
lines changed
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
133
133
134
134
public function getClassSpace (int |string $ class ): int |string
135
135
{
136
- if (!is_integer ($ class ) && class_exists ($ class )) {
136
+ if (!is_integer ($ class ) && ! ctype_lower ( $ class ) && class_exists ($ class )) {
137
137
if (!array_key_exists ($ class , $ this ->classNames )) {
138
138
$ this ->registerClass ($ class );
139
139
}
Original file line number Diff line number Diff line change @@ -48,6 +48,18 @@ public function testClassBased()
48
48
$ this ->assertEquals ($ row , $ mapper ->findOne ('constructor ' ));
49
49
}
50
50
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
+
51
63
public function testIdleField ()
52
64
{
53
65
$ mapper = $ this ->createMapper ();
You can’t perform that action at this time.
0 commit comments