11<h2 >ManagedModels for CoreData
2- <img src="https://zeezide.com/img/lighter/Lighter256 .png "
2+ <img src="https://zeezide.com/img/managedmodels/ManagedModels128 .png "
33 align="right" width="64" height="64" />
44</h2 >
55
@@ -82,8 +82,8 @@ struct ContentView: View {
8282}
8383
8484#Preview {
85- ContentView2 ()
86- .modelContainer (for : ContentView2. Item .self , inMemory : true )
85+ ContentView ()
86+ .modelContainer (for : Item.self , inMemory : true )
8787}
8888```
8989
@@ -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
@@ -126,25 +133,25 @@ iOS 10 / macOS 10.12 though (when `NSPersistentContainer` was introduced).
126133
127134#### TODO
128135
129- - [ ] Archiving/Unarchiving, required for migration.
130- - [ ] Figure out whether we can do ordered attributes.
131- - [ ] Figure out whether we can add support for array toMany properties.
132- - [ ] Support for "autosave".
133- - [ ] Support transformable types, not sure they work right yet.
134- - [ ] Generate property initializers if the user didn't specify any inits?
135- - [ ] Generate ` fetchRequest() ` class function.
136- - [ ] Support SchemaMigrationPlan/MigrationStage.
136+ - [x ] Archiving/Unarchiving, required for migration.
137+ - [ ] Figure out whether we can do ordered attributes: [ Issue # 1 ] ( https://github.com/Data-swift/ManagedModels/issues/1 ) .
138+ - [ ] Figure out whether we can add support for array toMany properties: [ Issue # 2 ] ( https://github.com/Data-swift/ManagedModels/issues/2 )
139+ - [ ] Support for "autosave": [ Issue # 3 ] ( https://github.com/Data-swift/ManagedModels/issues/3 )
140+ - [ ] Support transformable types, not sure they work right yet: [ Issue # 4 ] ( https://github.com/Data-swift/ManagedModels/issues/4 )
141+ - [ ] Generate property initializers if the user didn't specify any inits: [ Issue # 5 ] ( https://github.com/Data-swift/ManagedModels/issues/5 )
142+ - [x ] Generate ` fetchRequest() ` class function.
143+ - [ ] Support SchemaMigrationPlan/MigrationStage: [ Issue # 6 ] ( https://github.com/Data-swift/ManagedModels/issues/6 )
137144- [ ] Write more tests.
138- - [ ] Write DocC docs.
139- - [ ] Support for entity inheritance.
140- - [ ] Add support for originalName/versionHash in ` @Model ` .
141- - [ ] Generate "To Many" accessor function prototypes (` addItemToGroup ` etc).
142- - [ ] Foundation Predicate support (would require iOS 17+)
143- - [ ] SwiftUI ` @Query ` property wrapper/macro?
145+ - [ ] Write DocC docs: [ Issue # 7 ] ( https://github.com/Data-swift/ManagedModels/issues/7 ) , [ Issue # 8 ] ( https://github.com/Data-swift/ManagedModels/issues/8 )
146+ - [ ] Support for entity inheritance: [ Issue # 9 ] ( https://github.com/Data-swift/ManagedModels/issues/9 )
147+ - [ ] Add support for originalName/versionHash in ` @Model ` : [ Issue 10 ] ( https://github.com/Data-swift/ManagedModels/issues/10 )
148+ - [ ] Generate "To Many" accessor function prototypes (` addItemToGroup ` etc): [ Issue 11 ] ( https://github.com/Data-swift/ManagedModels/issues/11 )
149+ - [x ] Foundation Predicate support (would require iOS 17+) - this seems actually supported by CoreData!
150+ - [ ] SwiftUI ` @Query ` property wrapper/macro?: [ Issue 12 ] ( https://github.com/Data-swift/ManagedModels/issues/12 )
144151- [ ] Figure out all the cloud sync options SwiftData has and whether CoreData
145- can do them.
152+ can do them: [ Issue 13 ] ( https://github.com/Data-swift/ManagedModels/issues/13 )
146153- [ ] Figure out whether we can allow initialized properties
147- (` var title = "No Title" ` ).
154+ (` var title = "No Title" ` ): [ Issue 14 ] ( https://github.com/Data-swift/ManagedModels/issues/14 )
148155
149156Pull requests are very welcome!
150157Even just DocC documentation or more tests would be welcome contributions.
@@ -155,8 +162,16 @@ Even just DocC documentation or more tests would be welcome contributions.
155162- Apple:
156163 - [ CoreData] ( https://developer.apple.com/documentation/coredata )
157164 - [ SwiftData] ( https://developer.apple.com/documentation/swiftdata )
165+ - [ Meet SwiftData] ( https://developer.apple.com/videos/play/wwdc2023/10187 )
166+ - [ Build an App with SwiftData] ( https://developer.apple.com/videos/play/wwdc2023/10154 )
167+ - [ Model your Schema with SwiftData] ( https://developer.apple.com/videos/play/wwdc2023/10195 )
168+ - [ Enterprise Objects Framework] ( https://en.wikipedia.org/wiki/Enterprise_Objects_Framework ) / aka EOF
169+ - [ Developer Guide] ( https://developer.apple.com/library/archive/documentation/LegacyTechnologies/WebObjects/WebObjects_4.5/System/Documentation/Developer/EnterpriseObjects/DevGuide/EOFDevGuide.pdf )
158170- [ Lighter.swift] ( https://github.com/Lighter-swift ) , typesafe and superfast
159171 [ SQLite] ( https://www.sqlite.org ) Swift tooling.
172+ - [ ZeeQL] ( http://zeeql.io ) , prototype of an [ EOF] ( https://en.wikipedia.org/wiki/Enterprise_Objects_Framework ) for Swift,
173+ with many database backends.
174+
160175
161176
162177#### Disclaimer
0 commit comments