Yes I know. It doesn't support it yet but I want to include it at a future release. Probably it will be included at version 1.2.4 (not at 1.2.3 as I already planned my tasks) . For now a quick solution to solve this kind of issue is to use the set_model method. You can see an example at:
http://www.grocerycr...tions/set_model and /topic/90-how-to-create-an-extension-for-grocery-crud-real-example-included/. So in your case your model will look similar to this:
<?php
class MY_grocery_Model extends grocery_CRUD_Model {
function get_primary_key($table_name = null)
{
if($table_name == null)
{
return 'your_field_name'; // <-------- change this line here
}
else
{
$fields = $this->get_field_types($table_name);
foreach($fields as $field)
{
if($field->primary_key == 1)
{
return $field->name;
}
}
return false;
}
}
}
Just change the 'your_field_name' with the field name that you want to have as a key (even if it isn't). I think that you will not have any problem with this.