/** * Finds the post next to the given post * * @param Tx_BlogExample_Domain_Model_Post $post The reference post * @return Tx_BlogExample_Domain_Model_Post */ public function findNext(Tx_BlogExample_Domain_Model_Post $post) { $query = $this->createQuery(); return $query->matching($query->greaterThan('date', $post->getDate()))->execute()->getFirst(); }