Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Remove EAV properties from DB?
  • Hi, could you tell me please, how to remove already exists EAV properties?


    class Model_Model extends \Orm\Model
    {
    protected static $_has_many = array('properties');
    protected static $_eav = array(
    'properties' => array(
    'attribute' => 'name',
    'value' => 'value')
    );
    }
    $model = Model_Model::find(1);
    $model->new_properties = 'value';
    $model->old_properties = NULL; // don't delete from DB
    unset($model->old_properties); // not working
  • Harro VertonHarro Verton
    Accepted Answer
    Unset is the way to do it. But with all changes to the model, you need to save the model to save it's changes, and that includes EAV data.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion