Skip to content
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

Generating resources prompt for relationship, empty is not allowed #503

Closed
lawik opened this issue Mar 7, 2025 · 0 comments
Closed

Generating resources prompt for relationship, empty is not allowed #503

lawik opened this issue Mar 7, 2025 · 0 comments
Labels
bug Something isn't working needs review

Comments

@lawik
Copy link

lawik commented Mar 7, 2025

Describe the bug
Running the generation on https://github.com/nerves-hub/nerves_hub_web

Trying to skip a relationship does not work:

Multiple foreign keys found from `Hub.FirmwareDelta` to `Hub.Firmware` with the guessed name `firmware`.

Provide a relationship name for the one with the following info:

Resource: `Hub.FirmwareDelta`
Relationship Type: :belongs_to
Guessed Name: `:firmware`
Relationship Destination: `Hub.Firmware`
Constraint Name: `"firmware_deltas_source_id_fkey"`.

Leave empty to skip adding this relationship.

Name:
> 
is required

To Reproduce

git clone [email protected]:nerves-hub/nerves_hub_web
mix igniter.install ash ash_postgres@github:ash-project/ash_postgres
mix ash_postgres.gen.resources Hub
# answer "no" to migrations
# enter skip on most questions until the above is prompted

Expected behavior

It should either state that the information is required, up front, or let me skip :)

@lawik lawik added bug Something isn't working needs review labels Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs review
Projects
None yet
Development

No branches or pull requests

1 participant