     }
     
     /**
+     Extracts the keyPath string from a `CoreStoreObject.Relationship` property.
+     ```
+     let keyPath: String = Person.keyPath { $0.pets }
+     ```
+     */
+    public static func keyPath<O: CoreStoreObject, D: CoreStoreObject>(_ relationship: (Self) -> RelationshipContainer<O>.ToOne<D>) -> String  {
+        
+        return relationship(self.meta).keyPath
+    }
+    
+    /**
+     Extracts the keyPath string from a `CoreStoreObject.Relationship` property.
+     ```
+     let keyPath: String = Person.keyPath { $0.pets }
+     ```
+     */
+    public static func keyPath<O: CoreStoreObject, D: CoreStoreObject>(_ relationship: (Self) -> RelationshipContainer<O>.ToManyOrdered<D>) -> String  {
+        
+        return relationship(self.meta).keyPath
+    }
+    
+    /**
+     Extracts the keyPath string from a `CoreStoreObject.Relationship` property.
+     ```
+     let keyPath: String = Person.keyPath { $0.pets }
+     ```
+     */
+    public static func keyPath<O: CoreStoreObject, D: CoreStoreObject>(_ relationship: (Self) -> RelationshipContainer<O>.ToManyUnordered<D>) -> String  {
+        
+        return relationship(self.meta).keyPath
+    }
+    
+    /**
      Creates a `Where` clause from a `CoreStoreObject.Value` property.
      ```
      let person = CoreStore.fetchOne(From<Person>(), Person.where { $0.nickname == "John" })

        return !Where(attribute.keyPath, isEqualTo: value)
    }
}

    /**
     Creates an `OrderBy` clause from a `CoreStoreObject.Value` property.
     ```
     let person = CoreStore.fetchAll(From<Person>(), Person.orderBy(ascending: { $0.age }))
     ```
     */
    public static func orderBy<O: CoreStoreObject, V: ImportableAttributeType>(ascending attribute: (Self) -> ValueContainer<O>.Required<V>) -> OrderBy  {
        
        return OrderBy(.ascending(attribute(self.meta).keyPath))
    }
    
    /**
     Creates an `OrderBy` clause from a `CoreStoreObject.Value` property.
     ```
     let person = CoreStore.fetchAll(From<Person>(), Person.orderBy(ascending: { $0.age }))
     ```
     */
    public static func orderBy<O: CoreStoreObject, V: ImportableAttributeType>(ascending attribute: (Self) -> ValueContainer<O>.Optional<V>) -> OrderBy  {
        
        return OrderBy(.ascending(attribute(self.meta).keyPath))
    }
    
    /**
     Creates an `OrderBy` clause from a `CoreStoreObject.Value` property.
     ```
     let person = CoreStore.fetchAll(From<Person>(), Person.orderBy(descending: { $0.age }))
     ```
     */
    public static func orderBy<O: CoreStoreObject, V: ImportableAttributeType>(descending attribute: (Self) -> ValueContainer<O>.Required<V>) -> OrderBy  {
        
        return OrderBy(.descending(attribute(self.meta).keyPath))
    }
    
    /**
     Creates an `OrderBy` clause from a `CoreStoreObject.Value` property.
     ```
     let person = CoreStore.fetchAll(From<Person>(), Person.orderBy(descending: { $0.age }))
     ```
     */
    public static func orderBy<O: CoreStoreObject, V: ImportableAttributeType>(descending attribute: (Self) -> ValueContainer<O>.Optional<V>) -> OrderBy  {
        
        return OrderBy(.descending(attribute(self.meta).keyPath))
    }
    
    
    // MARK: Deprecated
    
    @available(*, deprecated, renamed: "orderBy(ascending:)")
    public static func ascending<O: CoreStoreObject, V: ImportableAttributeType>(_ attribute: (Self) -> ValueContainer<O>.Optional<V>) -> OrderBy  {
        
        return OrderBy(.ascending(attribute(self.meta).keyPath))
    }
    
    @available(*, deprecated, renamed: "orderBy(descending:)")
    public static func descending<O: CoreStoreObject, V: ImportableAttributeType>(_ attribute: (Self) -> ValueContainer<O>.Optional<V>) -> OrderBy  {
        
        return OrderBy(.descending(attribute(self.meta).keyPath))
