Hi Rene,

On 04/24/2010 11:38 AM, Christoph René Pardon wrote:

> Ok, thats not good if this is the only way because if i have 5 related
> tables i need to loop through all these 5 tables and merge the results
> to one array.
> 
> If there is no possibility with ezc to fetch all attributes at once, it
> should at least possible to store the manually fetched result within the
> persistent session?!
> 
> Something like:
> $ezcSession->setDataManually($result);


as we talked on IRC, this is not the way PersistentObject is meant to
work. Its purpose is to abstract from the database results and directly
create objects of it.

For your special case I would recommend to either use the code I pasted
you here or to use PDO directly to fetch the result. You can of course
use PersistentObject to create the query as you need it and just execute
it with PDO. Another solution would be to create a view in the database
and to map this view to a new object type.

Just for the records. :)

Regards,
Toby
-- 
Tobias Schlitt         tob...@schlitt.info       GPG Key: 0xC462BC14
a passion for php                     http://schlitt.info/opensource
eZ Components are Zeta Components now!          http://bit.ly/9S7zbn
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to