Entity_Post::relations PHP Method

relations() public static method

public static relations ( )
    public static function relations()
    {
        return array('comments' => array('type' => 'HasMany', 'entity' => 'Entity_Post_Comment', 'where' => array('post_id' => ':entity.id'), 'order' => array('date_created' => 'ASC')), 'tags' => array('type' => 'HasManyThrough', 'entity' => 'Entity_Tag', 'throughEntity' => 'Entity_PostTag', 'throughWhere' => array('post_id' => ':entity.id'), 'where' => array('id' => ':throughEntity.tag_id')), 'author' => array('type' => 'HasOne', 'entity' => 'Entity_Author', 'where' => array('id' => ':entity.author_id')));
    }