<commit_before><?php
/**
 */
class PlugingnAssetTable extends Doctrine_Table
{
  public function getAssetsForObject($model, $model_id, Doctrine_Query $q = null)
  {
    $q = $this->getQuery($q);

    $q->andWhere('a.model = ?', $model)
      ->andWhere('a.model_id = ?', $model_id);

    return $q->execute();
  }

  /**
   * Returns a Doctrine_Query object.
   *
   * @param Doctrine_Query $q
   * @return Doctrine_Query
   */
  private function getQuery(Doctrine_Query $q = null)
  {
    if (is_null($q))
    {
      $q = $this->getQueryObject()->from($this->getComponentName() .' a');
    }

    return $q;
  }
}<commit_msg>Added 'order by' to the retrieval query.<commit_after><?php
/**
 */
class PlugingnAssetTable extends Doctrine_Table
{
  public function getAssetsForObject($model, $model_id, Doctrine_Query $q = null)
  {
    $q = $this->getQuery($q);

    $q->andWhere('a.model = ?', $model)
      ->andWhere('a.model_id = ?', $model_id)
      ->orderBy('a.position, a.id');

    return $q->execute();
  }

  /**
   * Returns a Doctrine_Query object.
   *
   * @param Doctrine_Query $q
   * @return Doctrine_Query
   */
  private function getQuery(Doctrine_Query $q = null)
  {
    if (is_null($q))
    {
      $q = $this->getQueryObject()->from($this->getComponentName() .' a');
    }

    return $q;
  }
}
{'fraction_non_alphanumeric': 0.17463933181473046, 'fraction_numerical': 0.0, 'mean_word_length': 3.0305810397553516, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6337619', 'n_tokens_mistral': 486, 'n_tokens_neox': 475, 'n_words': 90}