Hello,
I was trying to set up a custom model.
I followed the example from the set_model documentation page:
https://www.grocerycrud.com/documentation/options_functions/set_model
In the example a function called "get_relation_n_n_unselected_array" is defined. What I find strange is that this function never gets called.
So in my code I tried the following:
public function edit_photo()
{
$this->view = false;
$crud = new grocery_CRUD();
$crud->set_model('My_Custom_model');
$crud->set_theme('datatables');
$crud->my_function();
...
class My_Custom_model extends grocery_CRUD_Model {
    function my_function()
    {
        echo 'test';
    }
}
I made sure that the custom model is inside the models directory.
I get an error that my_function is undefined.
What am I doing wrong?

 
                                