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

Add keyPath initializer for Persisted<LinkingObjects> #8136

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jsflax
Copy link
Contributor

@jsflax jsflax commented Feb 16, 2023

No description provided.

@cla-bot
Copy link

cla-bot bot commented Feb 16, 2023

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Jason Flax.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@leemaguire
Copy link
Contributor

needs a changelog entry

@@ -361,6 +361,9 @@ extension Persisted where Value: LinkingObjectsProtocol {
public init(originProperty: String) {
self.init(wrappedValue: Value(fromType: Value.Element.self, property: originProperty))
}
public init<V>(originProperty: KeyPath<Value.Element, V>) where Value.Element: ObjectBase {
Copy link
Member

Choose a reason for hiding this comment

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

This'll allow specifying any type of property as the origin property and ideally it'd be constrained to links.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@cla-bot
Copy link

cla-bot bot commented Feb 16, 2023

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Jason Flax.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@jsflax jsflax requested a review from tgoyne February 16, 2023 18:36
Copy link
Collaborator

@dianaafanador3 dianaafanador3 left a comment

Choose a reason for hiding this comment

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

Our test doesn't seem to like the use of this
EXC_BAD_ACCESS (code=2, address=0x16f603bb8).

@jsflax jsflax marked this pull request as draft May 9, 2023 15:11
@tgoyne tgoyne removed their request for review May 22, 2023 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants