Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. protected $_defaultEntity = "Library_Database_Entity_Tree_Mptt";
  2.    
  3.     // Field list
  4.    
  5.     public $id = array("type" => "int", "primary" => true, "serial" => true);
  6.     public $mptt_parent = array("type" => "int");
  7.     public $mptt_left = array("type" => "int");
  8.     public $mptt_right = array("type" => "int");
  9.    
  10.     // Parent relationship
  11.     public $parent = array(
  12.         'type' => 'relation',
  13.         'relation' => 'HasOne',
  14.         'mapper' => "Application_Mappers_TestMptt",
  15.         'where' => array('mptt_parent' => 'entity.id')
  16.         // Means the current mappers mptt_parent column = currently loaded Post entity id
  17.     );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement