Posted By

pntp on 03/08/11


Tagged

database orm kohana


Versions (?)

Kohana ORM configuration


 / Published in: PHP
 

  1. class Model_Translation extends ORM{
  2. protected $_primary_key = 'text_id'; // this mark for checking the object has been loaded yet.
  3. protected $_table_name = 'text_language';
  4. protected $_belongs_to = array(
  5. 'text' => array(
  6. 'model' => 'text',
  7. 'foreign_key' => 'text_id',
  8. )
  9. );
  10.  
  11. public function __construct($id = NULL) {
  12. parent::__construct($id);
  13. }
  14. }

Report this snippet  

You need to login to post a comment.