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 support for testing objects for equality #20

Merged
merged 1 commit into from
May 13, 2023

Conversation

ftchirou
Copy link
Owner

@ftchirou ftchirou commented May 13, 2023

Fixes #14 and #19. Adds support for testing equality of objects conforming to Identifiable with the == operator in predicates.

Example
class Note: NSManagedObject {
  @NSManaged var attachment: Attachment
}

class Attachment: NSManagedObject, Identifiable {
  @NSManaged var id: String
  ...
}

let attachment: Attachment = // ...
let predicate = \Note.attachment == attachment

@ftchirou ftchirou merged commit 6729efa into main May 13, 2023
@ftchirou ftchirou deleted the feature/object-comparison branch May 13, 2023 11:39
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.

Object comparison
1 participant