-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
bug(cli): cli does not respect custom relation getter name #4209
Comments
Correct me if I'm wrong but I believe this is expected behaviour. The CLI prompts for setting the |
@achrinza if this is the expected behavior, maybe there should be another prompt for customizing the naming in the repository? |
Just curious, what’s the use case for custom relation names?
…________________________________
From: derdeka <[email protected]>
Sent: Tuesday, November 26, 2019 5:07:45 PM
To: strongloop/loopback-next <[email protected]>
Cc: Rifa Achrinza <[email protected]>; Mention <[email protected]>
Subject: Re: [strongloop/loopback-next] bug(cli): cli does not respect custom relation getter name (#4209)
This email was sent from outside the organization. Please be cautious, the sender may not be who they claim to be.
@achrinza<https://github.com/achrinza> if this is the expected behavior, maybe there should be another prompt for customizing the naming in the repository?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#4209>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AF73T6Y6F4V3J7ZGIOCSGG3QVTRODANCNFSM4JRULUAQ>.
|
I have a model inheritance like |
@derdeka Thanks for providing extra info. I think this feature is a possibility (albeit the decision is up to the core maintainers), though there are limitations on using class inheritance that might be important to take note of. |
I've dug into the code and docs and found some inconsistencies:
There seems to be ambiguity on what this prompt is supposed to do. It doesn't help that the hasMany and hasOne docs also mention that their respective property relation decorators support the |
@dhmlau Maybe the core maintainers might want to look into this; if this is expected behaviour |
Steps to reproduce
Generating
hasMany
relation betweenNews
andNewsFile
object. Naming itfiles
instead of the defaultnewsFiles
:@loopback/[email protected]
Current Behavior
The custom name
files
is used in the model, but not in the repository:Expected Behavior
Expecting consistent naming across model and repository.
The text was updated successfully, but these errors were encountered: