File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ trait TEntity
1414
1515 public function __set ($ name , $ value )
1616 {
17- if ($ name !== 'Id ' && substr ($ name , -2 ) === 'Id ' ) {
17+ $ property = $ this ->getCurrentReflection ()->getEntityProperty ($ name );
18+
19+ if ($ property === NULL && $ name !== 'Id ' && substr ($ name , -2 ) === 'Id ' ) {
1820 $ this ->setRowValue (substr ($ name , 0 , -2 ), $ value );
1921
2022 } else {
@@ -25,7 +27,9 @@ public function __set($name, $value)
2527
2628 public function __get ($ name )
2729 {
28- if ($ name !== 'Id ' && substr ($ name , -2 ) === 'Id ' ) {
30+ $ property = $ this ->getCurrentReflection ()->getEntityProperty ($ name );
31+
32+ if ($ property === NULL && $ name !== 'Id ' && substr ($ name , -2 ) === 'Id ' ) {
2933 return $ this ->getRowValue (substr ($ name , 0 , -2 ));
3034 }
3135 return parent ::__get ($ name );
You can’t perform that action at this time.
0 commit comments