Field.Relationship propertyWrapper

This commit is contained in:
John Estropia committed 2020-01-20 17:13:01 +09:00
1 parent bcc2d9def3
commit 92ad895044
12 files changed
+881 -304

No files matched your search

+11
View File
@@ -451,6 +451,17 @@ extension Where where O: CoreStoreObject {
self.init(O.meta[keyPath: keyPath].keyPath, isEqualTo: value)
}
/**
Initializes a `Where` clause that compares equality
- parameter keyPath: the keyPath to compare with
- parameter value: the arguments for the `==` operator
*/
public init<V: FieldRelationshipToOneType>(_ keyPath: KeyPath<O, FieldContainer<O>.Relationship<V>>, isEqualTo value: V.DestinationObjectType?) {
self.init(O.meta[keyPath: keyPath].keyPath, isEqualTo: value)
}
/**
Initializes a `Where` clause that compares equality to `nil`