public function testBigIntIgnoreCaseOrderBy() { BookstorePeer::doDeleteAll(); // Some sample data $b = new Bookstore(); $b->setStoreName("SortTest1")->setPopulationServed(2000)->save(); $b = new Bookstore(); $b->setStoreName("SortTest2")->setPopulationServed(201)->save(); $b = new Bookstore(); $b->setStoreName("SortTest3")->setPopulationServed(302)->save(); $b = new Bookstore(); $b->setStoreName("SortTest4")->setPopulationServed(10000000)->save(); $c = new Criteria(); $c->setIgnoreCase(true); $c->add(BookstorePeer::STORE_NAME, 'SortTest%', Criteria::LIKE); $c->addAscendingOrderByColumn(BookstorePeer::POPULATION_SERVED); $rows = BookstorePeer::doSelect($c); $this->assertEquals('SortTest2', $rows[0]->getStoreName()); $this->assertEquals('SortTest3', $rows[1]->getStoreName()); $this->assertEquals('SortTest1', $rows[2]->getStoreName()); $this->assertEquals('SortTest4', $rows[3]->getStoreName()); }
public static function depopulate() { AcctAccessRolePeer::doDeleteAll(); AuthorPeer::doDeleteAll(); BookstorePeer::doDeleteAll(); BookstoreContestPeer::doDeleteAll(); BookstoreContestEntryPeer::doDeleteAll(); BookstoreEmployeePeer::doDeleteAll(); BookstoreEmployeeAccountPeer::doDeleteAll(); BookstoreSalePeer::doDeleteAll(); BookClubListPeer::doDeleteAll(); BookOpinionPeer::doDeleteAll(); BookReaderPeer::doDeleteAll(); BookListRelPeer::doDeleteAll(); BookPeer::doDeleteAll(); ContestPeer::doDeleteAll(); CustomerPeer::doDeleteAll(); MediaPeer::doDeleteAll(); PublisherPeer::doDeleteAll(); ReaderFavoritePeer::doDeleteAll(); ReviewPeer::doDeleteAll(); }
public static function depopulate($con = null) { if ($con === null) { $con = Propel::getConnection(BookPeer::DATABASE_NAME); } $con->beginTransaction(); AuthorPeer::doDeleteAll($con); BookstorePeer::doDeleteAll($con); BookstoreContestPeer::doDeleteAll($con); BookstoreContestEntryPeer::doDeleteAll($con); BookstoreEmployeePeer::doDeleteAll($con); BookstoreEmployeeAccountPeer::doDeleteAll($con); BookstoreSalePeer::doDeleteAll($con); BookClubListPeer::doDeleteAll($con); BookOpinionPeer::doDeleteAll($con); BookReaderPeer::doDeleteAll($con); BookListRelPeer::doDeleteAll($con); BookPeer::doDeleteAll($con); ContestPeer::doDeleteAll($con); CustomerPeer::doDeleteAll($con); MediaPeer::doDeleteAll($con); PublisherPeer::doDeleteAll($con); ReaderFavoritePeer::doDeleteAll($con); ReviewPeer::doDeleteAll($con); $con->commit(); }