-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
needs foreign table info in inflector.manyRelationByKeys #77
Comments
I believe this is already possible:
the
I believe you're saying this: create table site (
id serial not null primary key
);
create table discussion (
id serial not null primary key,
site int not null references site(id)
)
On the
The relation |
My bad, they all refer to the foreign table because it's a reverse relation. I'd definitely consider a PR that added the local table and schema as additional arguments to that inflector 👍 |
sorry I posted this too fast and made some mistakes / wasn’t very clear.yes, I’m talking about the field added by the PgBackwardRelationPlugin on the Site type. you’re absolutely right about the schema and the thing about pgColumnFilter that’s exactly why I wanted to filter fields in the first place :) should the 2nd and 3rd arguments be kept as they are always the same as in the key columns ? (or maybe keys should contain only the column names?) that would be a BC break. tell me and I’ll make a PR |
😳 I should spend more time reading people's usernames
I think the existing values should be kept because then it mirrors the forward relation; it's annoying to have 5 arguments but ¯\_(ツ)\_/¯ I probably should have gone with a named hash API instead. Oh well 😅 |
I’d like to know the foreign table name when building the manyRelationByKeys name
use case, column site on table discussion targets a row in table site
on the type
Site
I’d like to call the fielddiscussions
instead ofdiscussionBySite
because there is only one column on the key and that this column is named as the foreign key target tableThe text was updated successfully, but these errors were encountered: