Yii Framework Forum: Cactiverecord Not Generating Objects Properly From Left Join? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cactiverecord Not Generating Objects Properly From Left Join? Rate Topic: -----

#1 User is offline   Edjimucator 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 01-March 13

Posted 10 April 2013 - 04:07 PM

Hello All!

I am a bit confused and have been browsing the forums for about 2 hours now and am coming up short on finding a sufficient answer to my current problem. The problem I'm currently experiencing is that I am generating a model that isn't creating objects from a LEFT JOIN I have added to the query. I am purposely testing that objects are created even if null values are returned by the query.

Error Message:
Trying to get property of non-object


Attached below is a picture of the query results, t6_c3 with a null value but when I use

$model = PropertyAuction::model()->auctionDetails()->active()->findByPk($id);


and then try accessing the object data I am receiving the error above.

var_dump($model->propertyForeclosureInfos->default_amount);


[*NOTE*] If i add data it creates the objects fine. I have a fully composed alternative ID (with values, no nulls) and it functions properly(I'm using that word rather loosely in this case).

And before I go I'd like to thank anyone in advance for: any time spent reviewing this post and or any time spent suggesting/offering advice!

Thanks guys!

Attached File(s)


0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users