[2.0.6] Bug: can't save hasMany relation with lowercase alias
// this doesn't save (documentation teaches this way)
$album->songs = $songs;
$album->save();
// this does save
$album->Songs = $songs;
$album->save();
// this does save if the relation is hasOne
$album->songs = $song;
$album->save();
The strange thing is I COULD save with lowercase aliases up to and including this version, but not this particular time. No errors were returned and debugging came up with nothing, but Nate's comment suggested capitalizing the alias names and it worked.
@galki I confirmed this bug. Using capitalizing the alias name make it worked.
It must be a bug in belongsTo function.
@andresgutierrez This bug happens in 2.0.7 branch as well
fyi: have the same issue in 2.0.10 too ( at least for the belongsto ) and the uppercase worked
@tobasar @malletjo @galki Could someone provide script to reproduce?
I'm closing this issue due to the lack of any reaction. I'll open it again if the need arises