-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix AuthenticatedUser to Bike association #4
Draft
aokj4ck
wants to merge
32
commits into
main
Choose a base branch
from
fix-authenticated-user-to-bike-association
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… appropriate relationships (1:many). - Add bike_ids field to AuthenticatedUserResponse to aid in constructing an AuthenticatedUser SwiftData model with linked Bikes - Add Bike -> owner: User? relationship - Add AuthenticatedUser -> bikes: [Bike] relationship for owned-bikes
…ta/SwiftData debug logs
…uthenticated-user-to-bike-association
…to Bike connection when fetching profile
…uthenticated-user-to-bike-association
… catch and log in ContentView
…tData transactions
…s type - 1. Fetch profiles on launch. Return early and display error if any occur. - 2. Fetch profile's bikes on launch. Return early and display error if any occur.
…uthenticated-user-to-bike-association
…ance - Remove unused Transient UUID field
…icatedUser before proceeding - AuthenticatedUser contains a User - Only one authenticated user can operate the app at a time. - In the future multiple user records could be fetched for support in Organizations and app-originated (aka non-webview) Bike searches - These features do not exist yet but this seems the best architecture to build toward those: AuthUser and User separate, AuthUser singular, and keep that approach.
…etchBikes() - Asserts and guards that only one AuthenticatedUser model is found
…r instead of a fixed init(bike: Bike) var
…ersistentModelID) instead of Button { path.append }
…uthenticated-user-to-bike-association
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Bike.owner: User?
relationshipUser.bikes: [Bike]
Bike.authenticatedOwner: AuthenticatedUser?
relationshipAuthenticatedUser.bikes: [Bike]
ContentModel.fetchProfile
TODO:
ContentModel.fetchBikes
.