This won't work because the doSelect method adds all of the relevant fields to ensure that when the object is hydrated all of the data is present.
If you want to just fetch some data use the addSelectColumn method and use the doSelectRS method of the Peer classes. This will just fetch a Propel Result Set that you can iterate over. On 5/31/07, Kiril Angov <[EMAIL PROTECTED]> wrote: > > $criteria->addSelectColumn(ContentPeer::TITLE); > $criteria->addSelectColumn(ContentPeer::UPDATED_AT); > $criteria->addSelectColumn(ContentPeer::CREATED_AT); > > $this->contents = ContentPeer::doSelect($criteria); > > > I was trying also to give you the url to the Propel API docs but their > sire is down so please search for propel api docs in google and they > have a PEAR like documentation page with all Criteria() functions which > are self explanatory usually (like the one above). Propel by default > selects all columns as you have noticed already. > > Kupo > > Greg Freeman wrote: > > Hello, I'm new to propel and I have a question regarding the criteria. > > If I want to retrieve all rows in a table you can do something like > > this > > > > $this->contents = ContentPeer::doSelect(new Criteria()); > > > > I was wondering how to write a criteria rule to only select certain > > fields from the table, (for example title, created_at and updated_at). > > > > Thanks > > > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
