File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
Sources/ManagedModels/SchemaCompatibility Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,13 @@ The macro implementation requires Xcode 15/Swift 5.9 for compilation.
103103The generated code itself though should backport way back to
104104iOS 10 / macOS 10.12 though (when ` NSPersistentContainer ` was introduced).
105105
106+ Package URL:
107+ ```
108+ https://github.com/Data-swift/ManagedModels.git
109+ ```
110+
111+ ManagedModels has no other dependencies.
112+
106113
107114#### Differences to SwiftData
108115
Original file line number Diff line number Diff line change @@ -73,12 +73,12 @@ extension CoreData.NSAttributeDescription: SchemaProperty {
7373 self . attributeValueClassName = " NSNumber "
7474 }
7575 else if newValue == String . self {
76- self . attributeType = . integer64AttributeType
76+ self . attributeType = . stringAttributeType
7777 self . isOptional = false
7878 self . attributeValueClassName = " NSString "
7979 }
8080 else if newValue == String ? . self {
81- self . attributeType = . integer64AttributeType
81+ self . attributeType = . stringAttributeType
8282 self . isOptional = true
8383 self . attributeValueClassName = " NSString "
8484 }
@@ -182,16 +182,6 @@ extension CoreData.NSAttributeDescription: SchemaProperty {
182182 self . isOptional = true
183183 self . attributeValueClassName = " NSNumber "
184184 }
185- else if newValue == Int32 . self {
186- self . attributeType = . integer32AttributeType
187- self . isOptional = false
188- self . attributeValueClassName = " NSNumber "
189- }
190- else if newValue == Int32 ? . self {
191- self . attributeType = . integer32AttributeType
192- self . isOptional = true
193- self . attributeValueClassName = " NSNumber "
194- }
195185 else {
196186 // TBD:
197187 // undefinedAttributeType = 0
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ final class SchemaGenerationTests: XCTestCase {
2828 XCTAssertTrue ( toAddresses. isRelationship)
2929 XCTAssertFalse ( toAddresses. isToOneRelationship)
3030
31+ XCTAssertEqual ( firstname. attributeType, . stringAttributeType)
32+ XCTAssertTrue ( firstname. valueType == String . self)
33+
3134 // Those can't be setup yet.
3235 XCTAssertTrue ( toAddresses. destination. isEmpty)
3336 XCTAssertNil ( toAddresses. inverseName)
You can’t perform that action at this time.
0 commit comments