Posted 12 June 2012 - 22:04 PM
I'm having the same problem, but my field IS auto_increment. Here's the error I'm getting:
[quote]
[color=#4F5155]On the state "edit" the Primary key cannot be null --- #0 C:\wamp\www\definitions\src\application\libraries\grocery_crud.php(3324): grocery_CRUD_States->getStateInfo() #1 C:\wamp\www\definitions\src\application\controllers\examples.php(46): grocery_CRUD->render() #2 [internal function]: Examples->edit() #3 C:\wamp\www\definitions\src\system\core\CodeIgniter.php(359): call_user_func_array(Array, Array) #4 C:\wamp\www\definitions\src\index.php(202): require_once('C:\wamp\www\def...') #5 {main}[/color]
[/quote]
This is the dump from MySQL:
[quote][font=courier new,courier,monospace]--[/font]
[font=courier new,courier,monospace]-- Table structure for table `definitions`[/font]
[font=courier new,courier,monospace]--[/font]
[font=courier new,courier,monospace]CREATE TABLE IF NOT EXISTS `definitions` ([/font]
[font=courier new,courier,monospace] `definition_id` int(11) unsigned NOT NULL AUTO_INCREMENT,[/font]
[font=courier new,courier,monospace] `term` varchar(64) NOT NULL,[/font]
[font=courier new,courier,monospace] `definition` text NOT NULL,[/font]
[font=courier new,courier,monospace] PRIMARY KEY (`definition_id`)[/font]
[font=courier new,courier,monospace]) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;[/font]
[font=courier new,courier,monospace]--[/font]
[font=courier new,courier,monospace]-- Dumping data for table `definitions`[/font]
[font=courier new,courier,monospace]--[/font]
[font=courier new,courier,monospace]INSERT INTO `definitions` (`definition_id`, `term`, `definition`) VALUES[/font]
[font=courier new,courier,monospace](1, 'start', 'stop');[/font][/quote]