You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fact, i need to overwrite the qualifyColumn in order to make whereHas function from builder work when i have a versioned foreign key (and make belongsTo relationship work).
I can understand that overwrite a model method can't be the best solution, but if we're already overwriting the method getQualifiedDeletedAtColumn() in the SoftDeletes trait, i think we can do it.
That fix make the SoftDeletes trait useless and allow us to write less code in model.
What do you think about it ?
The text was updated successfully, but these errors were encountered:
Mortred974
changed the title
Overwrite qualifyColumn model method in order to make some relation work on versioned model
Overwrite qualifyColumn model method in order to make some relationship work on versioned model
Sep 10, 2018
Hi guys !
Inspired by #17 , i try this in order to make some relationships work :
App\Custom\ProAI\Versioning\Versionable.php
App\Custom\ProAI\Versioning\HasVersionedRelationships.php
In fact, i need to overwrite the
qualifyColumn
in order to makewhereHas
function from builder work when i have a versioned foreign key (and makebelongsTo
relationship work).I can understand that overwrite a model method can't be the best solution, but if we're already overwriting the method
getQualifiedDeletedAtColumn()
in theSoftDeletes
trait, i think we can do it.That fix make the
SoftDeletes
trait useless and allow us to write less code in model.What do you think about it ?
The text was updated successfully, but these errors were encountered: