title: Phalcon\Mvc\Model and composite primary key
body: <p>I use Phalcon\Mvc\Model for all entities in my project (to keep things standartized).
  Today i had to import maxmind geoip database in my mysql database to implement native relationships between some entities and maxmind locations (and blocks).</p>
  
  <p>Maxmind database is delivered in csv by default, so how to organize it in mysql - is a question that every developer has to solve according to his needs. Maxmind database contains 2 files: </p>
  
  <ol>
  <li>GeoLiteCity-Blocks.csv  (stores ip ranges)</li>
  <li>GeoLiteCity-Location.csv (stores information about location)</li>
  </ol>
  
  <p>Most tutorials advice to use following table definition for storing table with ip ranges:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `GeoLiteCity_Blocks` (
    `startIpNum` int(10) unsigned NOT NULL,
    `endIpNum` int(10) unsigned NOT NULL,
    `locId` int(10) unsigned NOT NULL,
    PRIMARY KEY (`startIpNum`,`endIpNum`)
  ) ENGINE=InnoDB;
  </code></pre>
  
  <p>As you see there is composite primary key. Is it ok to use such key in Phalcon\Mvc\Model? I suppose there are some limits (logically, they should exist, for example, i can't predict Phalcon\Mvc\Model::findFirst($key) method behaviour)</p>
  
  <p>Really, i don't care about disk size, that this table will use, for me only one thing is important - performance. Also i would like to keep all models standartized, not to remember huge amount of small aspects for each entity/table.</p>
  
  <p>So, my question: is it ok to use Phalcon\Mvc\Model with composite key or it is better to make one extra <code>id</code> column, that will be primary key &amp; add index to <code>startIpNum</code> and <code>endIpNum</code> to make selects faster?</p>