Jump to content


buslik

Member Since 15 Jul 2013
Offline Last Active Private
-----

Topics I've Started

Puzzled with relation 1 to n

15 July 2013 - 11:35 AM

Hi all,

 

I have next DB:

CREATE TABLE IF NOT EXISTS `req` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `desc` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;


CREATE TABLE IF NOT EXISTS `accTest` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reqId` int(11) NOT NULL,
  `desc` TEXT NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

and I want to have some of acceptance tests rper requirement.

 

right now i have next in my controller:

        $this->grocery_crud->set_table('req');
	$this->grocery_crud->set_relation('id','accTest','{reqId} {desc}');
        $output = $this->grocery_crud->render();

And it only shows requirements, so all linked tests are missing.

 

How can I add acceptance tests to requirement?