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

Ecto changeset associations #98

Merged

Conversation

SimonLab
Copy link
Member

@SimonLab SimonLab commented Jul 11, 2022

To merge after #97
ref: #94

- Update association to use Ecto.Changeset functions
- Make sure seeds file can creates statuses and person

related to: #94
@SimonLab SimonLab added the in-progress An issue or pull request that is being worked on by the assigned person label Jul 11, 2022
@SimonLab SimonLab self-assigned this Jul 11, 2022
@SimonLab SimonLab temporarily deployed to dwylauth July 11, 2022 12:13 Inactive
@SimonLab SimonLab changed the base branch from main to phoenix-1.6-2022-refresh-issue-#89 July 11, 2022 12:13
SimonLab added 4 commits July 11, 2022 15:40
Update the item status using put_assoc
Update the list_item function to checkt the
status ecto assocation value is not "deleted"

ref: #94 (comment)
@SimonLab SimonLab marked this pull request as ready for review July 11, 2022 15:24
@SimonLab SimonLab requested a review from nelsonic July 11, 2022 15:24
@SimonLab SimonLab added awaiting-review An issue or pull request that needs to be reviewed and removed in-progress An issue or pull request that is being worked on by the assigned person labels Jul 11, 2022
Copy link
Member

@nelsonic nelsonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SimonLab 👍
Please see: #94 (comment)

@nelsonic nelsonic merged commit 91bded8 into phoenix-1.6-2022-refresh-issue-#89 Jul 13, 2022
@nelsonic nelsonic deleted the ecto-changeset-associations-#94 branch July 13, 2022 23:42
field :text, :string

belongs_to :status, App.Status, on_replace: :nilify
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a beginner's perspective, it doesn't make any sense that an item would "belongs_to" a Status.
An item can have a status but it doesn't "belong" to the status.
This is immediately confusing and adds no value to the MVP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review An issue or pull request that needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants