I have a trouble with my Doctrine generated classes accessors.
It seems that the accessors don't behave the same whether a leftJoin has
been previously performed or not.
I understand that the idea is to avoid loading the data from DB if a join
was performed, but in case there is nothing to join, the outside behavior of
the accessor is not the same depending whether a join has been performed or
not.

This means that if in my template I want to echo:

$book->getCoverArtist()->getName();

If there was no leftJoin performed on the "Artist" table, it's always
successful.
If I earlier did join the artist table in my request and I have a product
for which we don't know any cover artist in the database, I'll get an error
because I'm trying to use the getName() method on a non-object.

Shouldn't the accessor method behave the same in both cases?
Is there a way to overcome this error without re-writing all my accessors to
change their return value in case nothing is returned?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to