Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when printing model schema, if one of the attributes is of the type URI #504

Open
pawan-joshi opened this issue May 22, 2024 · 1 comment

Comments

@pawan-joshi
Copy link

pawan-joshi commented May 22, 2024

I tried to print model schema from data stack

 let dataStack: DataStack
 private init() {
     dataStack = DataStack(
         xcodeModelName: "MyModel",
         bundle: Bundle.main,
         migrationChain: ["MyModel", "MyModel1"]
     )
 }
 
 func initializeCachingEngine() {
     do {
         let store = try dataStack.addStorageAndWait(SQLiteStore(fileName: "MyModel.sqlite", localStorageOptions: .allowSynchronousLightweightMigration))
         print("File URL : \(store.fileURL)")
         let schema = dataStack.modelSchema.printCoreStoreSchema()
         print(" SCHEMA : \(schema)")
     } catch { print("ERROR:  \(error.localizedDescription)") }
 }

On line
let schema = dataStack.modelSchema.printCoreStoreSchema()
It crashed because In one of the entities in my xcdatamodel file had an attribute with URI type

pawan-joshi added a commit to pawan-joshi/CoreStore that referenced this issue May 22, 2024
@pawan-joshi
Copy link
Author

Raise a pull request with fix.
#505

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant