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
I have found however a possible bug with foreign keys pointing at the same table.
I've got a simple self-parenthood where primary id points to a parent_id on the same table, the resolved relationships looks like this:
public function questions() { return $this->hasMany(Questions::class, 'parent_id'); }
while there should be also/or a "belongsTo" relationship.
I tried also by specifing a second relationships where parent_id and id are inverted with no results.
Changing relation_name_strategy from 'related' to 'foreign_key' works like it should but every other relationship name become different, disrupting the application.
Is there any know workaround or suggesion?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi, great pagacke!
I have found however a possible bug with foreign keys pointing at the same table.
I've got a simple self-parenthood where primary id points to a parent_id on the same table, the resolved relationships looks like this:
public function questions() { return $this->hasMany(Questions::class, 'parent_id'); }
while there should be also/or a "belongsTo" relationship.
I tried also by specifing a second relationships where parent_id and id are inverted with no results.
Changing relation_name_strategy from 'related' to 'foreign_key' works like it should but every other relationship name become different, disrupting the application.
Is there any know workaround or suggesion?
Thanks!
The text was updated successfully, but these errors were encountered: