krafthaus / bauhaus

Laravel 4 Admin Generator
http://bauhaus.krafthaus.nl/
GNU General Public License v2.0
1 stars 0 forks source link

belongsTo Relationship Not Updating #35

Open crofton77 opened 10 years ago

crofton77 commented 10 years ago

My owner relation ship is not updating.

I have added 'owner_id' column in the database.

The issue I am having is after updating the 'owner_id' is still the same as it was before update. How do I get this to work correctly?

//From Model
public function owner() {
    return $this->belongsTo('KraftHaus\BauhausUser\User');
}

// From AdminModel    
public function configureForm($mapper)
{
    ...
    $mapper->belongsTo('owner')->display('first_name');
}
jgkinnear commented 9 years ago

Just a thought, you're eloquent model may not allow owner_id to be fillable?