title: Uncaught exception 'Phalcon\Mvc\Model\Exception' with message 'The method "issent" doesn't exist on model "Artist"'
body: <p>I have built a micro application by Phalcon framework.</p>
  
  <p>This is my code:</p>
  
  <p><strong><code>index.php</code>:</strong></p>
  
  <pre><code>&lt;?php
  use Phalcon\Mvc\Micro,
      Phalcon\Http\Response;
  
  $loader = new \Phalcon\Loader();
  
  $loader-&gt;registerDirs(array(
      __DIR__ . '/models/'
  ))-&gt;register();
  
  $di = new \Phalcon\DI\FactoryDefault();
  
  $di-&gt;set('db', function(){
      return new \Phalcon\Db\Adapter\Pdo\Mysql(array(
          "host" =&gt; "localhost",
          "username" =&gt; "root",
          "password" =&gt; "xxx",
          "dbname" =&gt; "xxx"
      ));
  });
  
  $app = new \Phalcon\Mvc\Micro($di);
  
  $app-&gt;after(function() use ($app) {
      echo json_encode($app-&gt;getReturnedValue());
  });
  
  $app-&gt;notFound(function () use ($app) {
      $app-&gt;response-&gt;setStatusCode(404, "Not Found")-&gt;sendHeaders();
      echo 'This is crazy, but this page was not found!';
  });
  
  
  $app-&gt;get('/artist/{id}', function ($id) {
      $response = new Response();
  
      $response-&gt;setHeader("Content-Type", "application/json")-&gt;send();
      $artist = Artist::findFirstById($id);
  
      return $artist;
  });
  
  $app-&gt;handle();
  </code></pre>
  
  <p><strong><code>Artist.php</code></strong></p>
  
  <pre><code>&lt;?php
  
  
  use Phalcon\Mvc\Model\Validator\Email as Email;
  
  class Artist extends \Phalcon\Mvc\Model
  {
  
      /**
       *
       * @var integer
       */
      public $id;
  
      /**
       *
       * @var string
       */
      public $title;
  
      /**
       *
       * @var string
       */
      public $slug;
  
      /**
       *
       * @var string
       */
      public $content;
  
      /**
       *
       * @var string
       */
      public $image;
  
      /**
       *
       * @var string
       */
      public $thumb;
  
      /**
       *
       * @var integer
       */
      public $views;
  
      /**
       *
       * @var integer
       */
      public $likes;
  
      /**
       *
       * @var integer
       */
      public $total_views;
  
      /**
       *
       * @var integer
       */
      public $total_downloads;
  
      /**
       *
       * @var string
       */
      public $rank;
  
      /**
       *
       * @var string
       */
      public $real_name;
  
      /**
       *
       * @var string
       */
      public $email;
  
      /**
       *
       * @var string
       */
      public $phone;
  
      /**
       *
       * @var string
       */
      public $dob;
  
      /**
       *
       * @var string
       */
      public $death;
  
      /**
       *
       * @var string
       */
      public $born_address;
  
      /**
       *
       * @var string
       */
      public $current_address;
  
      /**
       *
       * @var string
       */
      public $work_address;
  
      /**
       *
       * @var string
       */
      public $is_group;
  
      /**
       *
       * @var string
       */
      public $status;
  
      /**
       *
       * @var string
       */
      public $created_at;
  
      /**
       *
       * @var string
       */
      public $modified_at;
  
      /**
       * Validations and business logic
       */
      public function validation()
      {
  
          $this-&gt;validate(
              new Email(
                  array(
                      "field"    =&gt; "email",
                      "required" =&gt; true,
                  )
              )
          );
          if ($this-&gt;validationHasFailed() == true) {
              return false;
          }
      }
  
  }
  </code></pre>
  
  <p>When visiting the API: <a href="http://domain.com/artist/1" rel="nofollow">http://domain.com/artist/1</a>, it returns the expecting json data of an artist object, but the status of browser's header is 500 (Internal Server Error).</p>
  
  <p>I checked the error log, it shows:</p>
  
  <blockquote>
    <p>PHP Fatal error:  Uncaught exception 'Phalcon\Mvc\Model\Exception'
    with message 'The method "issent" doesn't exist on model "Artist"' in
    /var/www/localhost/index.php:52\nStack trace:\n#0
    [internal function]: Phalcon\Mvc\Model->__call('issent', Array)\n#1
    [internal function]: Artist->issent()\n#2
    /var/www/localhost/index.php(52):
    Phalcon\Mvc\Micro->handle()\n#3 {main}\n  thrown in
    /var/www/localhost/index.php on line 52</p>
  </blockquote>