// get a single object by primary key $article = ArticlePeer::retrieveByPK($id); // update object and save changes to database $article->setTitle('New Title'); $article->save();
// delete multiple objects by criteria $criteria = new Criteria(); $criteria->add(ArticlePeer::PUBLISHED_AT, time(), Criteria::LESS_THAN); ArticlePeer::doDelete($criteria);This code deletes multiple articles that are no longer published based on a criteria. The `Criteria` object is used to identify the articles and the `doDelete()` method is used to delete them from the database. These examples use the Propel ORM library.