I have two databases on two different servers. One is a local server, the other is a remote server. The data resides on the remote server, and the models are on the local server. They are connected via the ConnectionService() method in the Model class. Both of the Models are accessing the schemas on the remote server
Now when I do
$id = 1;
$result = MyNameSpace\User::findFirst(['conditions'=>'id=?1','bind'=>[1=>$id]]);
I get my result as expected. However, I have a related model called UserAddress. It has a hasOne relation.
So when I use
and I ouput it on the view, I get the results as expected. However, in my log files I am recieveing a notice.
PHP Notice: Trying to get property of non-object in /var/www/example/app/views/example_dir/example.phtml
Any one have any ideas on why this would be triggering a PHP notice?