I'm building a form to access/create/update based on a vo/dao pattern model that's already been made.
I've been having good luck with <?php echo $product->name ?>
since it's just blank if it's not loading an already existant object (using one form for both edit and create).
The problem comes, though, because the $products object contains other objects inside of it, so if I call $product->video->id
I get 'Notice: Trying to get property of non-object' if $product->video hasn't been defined yet.
I tried setting $product->video as a new Video in the vo, but it wouldn't let me include the video class.
If having an object inside an object like that is a terrible idea, please let me know also; it seems like a convenient way of dealing with relational tables for now at the very least.