-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
15 changed files
with
178 additions
and
35 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
16 changes: 16 additions & 0 deletions
16
MJExtensionTests/CoreDataModel/MJCDTesterInverseSelf+CoreDataClass.swift
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// MJCDTesterInverseSelf+CoreDataClass.swift | ||
// MJExtensionTests | ||
// | ||
// Created by Frank on 2022/1/7. | ||
// Copyright © 2022 MJ Lee. All rights reserved. | ||
// | ||
// | ||
|
||
import Foundation | ||
import CoreData | ||
|
||
@objc(MJCDTesterInverseSelf) | ||
public class MJCDTesterInverseSelf: NSManagedObject { | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
MJExtensionTests/CoreDataModel/MJCDTesterInverseSelf+CoreDataProperties.swift
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// MJCDTesterInverseSelf+CoreDataProperties.swift | ||
// MJExtensionTests | ||
// | ||
// Created by Frank on 2022/1/10. | ||
// Copyright © 2022 MJ Lee. All rights reserved. | ||
// | ||
// | ||
|
||
import Foundation | ||
import CoreData | ||
|
||
|
||
extension MJCDTesterInverseSelf { | ||
|
||
@nonobjc public class func fetchRequest() -> NSFetchRequest<MJCDTesterInverseSelf> { | ||
return NSFetchRequest<MJCDTesterInverseSelf>(entityName: "MJCDTesterInverseSelf") | ||
} | ||
|
||
@NSManaged public var age: Int16 | ||
@NSManaged public var identifier: String? | ||
@NSManaged public var isJuan: Bool | ||
@NSManaged public var name: String? | ||
@NSManaged public var relatives: Set<MJCDTesterInverseSelf>? | ||
|
||
} | ||
|
||
// MARK: Generated accessors for relatives | ||
extension MJCDTesterInverseSelf { | ||
|
||
@objc(addRelativesObject:) | ||
@NSManaged public func addToRelatives(_ value: MJCDTesterInverseSelf) | ||
|
||
@objc(removeRelativesObject:) | ||
@NSManaged public func removeFromRelatives(_ value: MJCDTesterInverseSelf) | ||
|
||
@objc(addRelatives:) | ||
@NSManaged public func addToRelatives(_ values: NSSet) | ||
|
||
@objc(removeRelatives:) | ||
@NSManaged public func removeFromRelatives(_ values: NSSet) | ||
|
||
} |
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
21 changes: 19 additions & 2 deletions
21
...s/CoreDataModel/MJCoreDataTestModel.xcdatamodeld/MJCoreDataTestModel.xcdatamodel/contents
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="19574" systemVersion="21C52" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> | ||
<entity name="MJCDTesterInverseSelf" representedClassName="MJCDTesterInverseSelf" syncable="YES"> | ||
<attribute name="age" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/> | ||
<attribute name="identifier" optional="YES" attributeType="String"/> | ||
<attribute name="isJuan" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/> | ||
<attribute name="name" optional="YES" attributeType="String"/> | ||
<relationship name="relatives" optional="YES" toMany="YES" deletionRule="No Action" destinationEntity="MJCDTesterInverseSelf" inverseName="relatives" inverseEntity="MJCDTesterInverseSelf"/> | ||
<fetchedProperty name="bestJuans" optional="YES"> | ||
<fetchRequest name="fetchedPropertyFetchRequest" entity="MJCDTesterInverseSelf"/> | ||
</fetchedProperty> | ||
</entity> | ||
<entity name="Person" representedClassName="MJCoreDataPerson" syncable="YES"> | ||
<attribute name="age" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/> | ||
<attribute name="name" optional="YES" attributeType="String"/> | ||
<relationship name="tester" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Tester" inverseName="relatives" inverseEntity="Tester"/> | ||
<fetchedProperty name="bestJuans" optional="YES"> | ||
<fetchRequest name="fetchedPropertyFetchRequest" entity="Person"/> | ||
</fetchedProperty> | ||
</entity> | ||
<entity name="Tester" representedClassName="MJCoreDataTester" syncable="YES"> | ||
<attribute name="age" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/> | ||
<attribute name="identifier" optional="YES" attributeType="String"/> | ||
<attribute name="isJuan" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/> | ||
<attribute name="name" optional="YES" attributeType="String"/> | ||
<relationship name="relatives" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Person" inverseName="tester" inverseEntity="Person"/> | ||
<fetchedProperty name="bestJuans" optional="YES"> | ||
<fetchRequest name="fetchedPropertyFetchRequest" entity="Tester"/> | ||
</fetchedProperty> | ||
</entity> | ||
<elements> | ||
<element name="Tester" positionX="-63" positionY="-18" width="128" height="104"/> | ||
<element name="Person" positionX="-45" positionY="45" width="128" height="74"/> | ||
<element name="MJCDTesterInverseSelf" positionX="-36" positionY="63" width="128" height="125"/> | ||
<element name="Person" positionX="-45" positionY="45" width="128" height="95"/> | ||
<element name="Tester" positionX="-63" positionY="-18" width="128" height="125"/> | ||
</elements> | ||
</model> |
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
Oops, something went wrong.