My code is like this 2 primary tables:
business_role and user_story with both PK AI keys named busines_roleID and user_storyID
An intersection table user_story_business_role containing 2 fields busines_roleID and user_storyID
in the middle:
The code in business_role template
$crud->set_relation_n_n('bla', 'user_story_business_role', 'user_story', 'business_roleID', 'user_storyID', 'name');
name is a varchar field in user_story.
'bla' is in my field list
It throws this message at the business role page:
A PHP Error was encountered
Severity: Warning
Message: Creating default object from empty value
Filename: libraries/Grocery_CRUD.php
Line Number: 1106
Backtrace:
File: /Volumes/WDMobile/htdocs/ezbuild30/application/ezbuild/libraries/Grocery_CRUD.php
Line: 1106
Function: _error_handler
File: /Volumes/WDMobile/htdocs/ezbuild30/application/ezbuild/libraries/Grocery_CRUD.php
Line: 1543
Function: get_edit_values
File: /Volumes/WDMobile/htdocs/ezbuild30/application/ezbuild/libraries/Grocery_CRUD.php
Line: 3964
Function: showEditForm
File: /Volumes/WDMobile/htdocs/ezbuild30/application/ezbuild/controllers/Business_role.php
Line: 392
Function: render
File: /Volumes/WDMobile/htdocs/ezbuild30/ezbuild.php
Line: 271
Function: require_once
The same code on the user_story page here no error message but I miss the options add all records as shown in the examples. I can select multiple items but remove all add all records is missing.
The code in the user_story template is this one:
$crud->set_relation_n_n('n:m', 'user_story_business_role', 'business_role', 'user_storyID', 'business_roleID', '{name}');
name is a field in business_role.
Big Thanks!