-
-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Foreign key configuration for BelongsTo
or HasMany
relationship.
#998
Comments
I see, seems like the We changed this in v4 to use a config key instead of a trait property, since PHP 8.1 shows deprecation notices when you try to access trait properties (#854): 24146b2 But I see your point that this relates to The change you proposed to And for the |
Thanks for opening the issue! |
Thanks @stancl . |
Description
To have a centralized foreign key configuration for relationships. In the tenancy config, we can add a key to specify the value of the foreign key to reference the tenant's column.
Why this should be added
I'm currently using
uuid
as the primary key for tenants and based on the documentation to override the defaulttenant_id
foreign key, we need to changeBelongsToTenant::$tenantIdColumn
. I noticed that theHasDomains
trait is specifically defining the foreign key astenant_id
.If we were to implement a configurable foreign key in the
tenancy
config file. We can perhaps do something like.The text was updated successfully, but these errors were encountered: