However:
1- I set up my containers and confirmed both (ss and db) are working and accessible
2- Created the models and admin model (copied and pasted the exact same code)
3- Ran /dev/build successfully with no errors and confirmed all tables are created
4- Created the first Author instance with no issues
5- Created the first Book instance with no issues (the issue is raised right after book is created)
6- Error is raised preventing me to either: create another Book or go to the Review tab to create a Review.
Error:
ERROR: Uncaught Exception Exception: "SearchField 'Book' on 'App\Model\Review' does not return a valid DBField instance." at /var/www/html/vendor/silverstripe/framework/src/ORM/DataObject.php line 2434 {"exception":"[object] (Exception(code: 0): SearchField 'Book' on 'App\Model\Review' does not return a valid DBField instance.
would really appreciate your feedback on this :) cheers
Great tutorial!
However:
1- I set up my containers and confirmed both (ss and db) are working and accessible
2- Created the models and admin model (copied and pasted the exact same code)
3- Ran /dev/build successfully with no errors and confirmed all tables are created
4- Created the first Author instance with no issues
5- Created the first Book instance with no issues (the issue is raised right after book is created)
6- Error is raised preventing me to either: create another Book or go to the Review tab to create a Review.
Error:
ERROR: Uncaught Exception Exception: "SearchField 'Book' on 'App\Model\Review' does not return a valid DBField instance." at /var/www/html/vendor/silverstripe/framework/src/ORM/DataObject.php line 2434 {"exception":"[object] (Exception(code: 0): SearchField 'Book' on 'App\Model\Review' does not return a valid DBField instance.
would really appreciate your feedback on this :) cheers
So I've looked this up now. The problem is the $summary_fields in Review.php. It should be:
So it is the title of the book that will be in the summary fields, not the object Book.
Thanks for the feedback. I'll look into it!