Login | Register
My pages Projects Community openCollabNet

propel
Reply to message

* = Required fields
* Subject
* Body
Attachments
Send reply to
Topic
Author (directly in email)
Please type the letters in the image above.

Original message

Author Sven Tietje <tietje@topconcepts.de>
Full name Sven Tietje <tietje@topconcepts.de>
Date 2006-10-04 08:11:30 PDT
Message David Zulke wrote:
> My thoughts here:
>
> 1) I just realized how much overhead we have when fetching results:
>
> while($row = $stmt->fetch(PDO​::FETCH_NUM)) {
> $obj = new $cls();
> $obj->hydrate($row);
> $results[] = $obj;
> }
>
> We can use PDO::FETCH_CLASS here. PDO will then create a new "Book"
> instance and set the fields. We can even pass constructor arguments,
> very schweet. I think I'll test this later. This is a non-breaking
> change for 1.3 that should make things a bit faster.

Yes, I`d like to. Excatly, what i thought of...

> I don't really see a need for FETCH_INTO there!?

Just an option - i have some pages with many output and overviews. I, i
could use arrays, but losing some methods as described in my Person-Example
would be a mess to me :D