scoumbourdis / grocery-crud

Grocery CRUD is a PHP Codeigniter Framework library that creates a full functional CRUD system without the requirement of extra customisation to the JavaScripts or the CSS to do it so.
http://www.grocerycrud.com
GNU General Public License v3.0
1.01k stars 472 forks source link

Codeigniter Database Cache and Grocery Crud #246

Open shahmir opened 11 years ago

shahmir commented 11 years ago

I am using grocery crud in my codeigniter project. It was working fine until I switched on "Database Caching".

Rest of project still works fine but I get following error whenever I open grocery crud controller

Fatal error: Cannot access empty property in pathToProject\application\libraries\grocery_crud.php on line 1441

querycache

harpreetsb commented 10 years ago

similar problem, Urgent help required. as soon as i enable database caching i get error on Filename: /home/vproud/public_html/models/grocery_crud_model.php

Line Number: 87

raviraiya commented 10 years ago

Hi i m also getting same error.. Please fix this ASAP. we are not able to use database cache in application

raviraiya commented 10 years ago

Hi i found solution of this problem. you need to use following code :
$crud->set_primary_key('primery_key_name','tablename');

like i have a task table : $crud->set_primary_key('task_id','task');

you need to define which is your primary key in your table

PaulKish commented 7 years ago

This bug still exists, I have been able to still have caching for the rest of the application by adding $this->db->cache_off(); in the grocery_crud_model.php file.