Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Problems add EAV to ORM model
I currently have
model. I've tried to add EAV feature to it, but just after changing the file (and adding a
) the app crashed. Besides this, nothing changed. What could have gone wrong?
That is not how EAV works.
You need to define the a standard has_many relation first, like you would do for any related model. So your Model_Refurbishing is missing a has_many:
'attributes' => array(
'key_from' => 'id',
'model_to' => '\Technician\Model_Refurbishing_Atttribute',
'key_to' => 'refurbishing_id',
'cascade_delete' => true,
And then you define the EAV container by using the same name as the relation, and defining the key and value column names. There is no need to define a model here, it looks like there is a copy/paste error in the docs.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion