{"id":22405445,"url":"https://github.com/vinayhosamane/mastercoredata","last_synced_at":"2026-04-27T12:02:50.523Z","repository":{"id":195682893,"uuid":"364614438","full_name":"vinayhosamane/MasterCoredata","owner":"vinayhosamane","description":"This repository is to try to different uses cases in coredata.","archived":false,"fork":false,"pushed_at":"2021-05-22T05:05:33.000Z","size":162,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T01:23:25.061Z","etag":null,"topics":["database","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinayhosamane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-05-05T15:00:15.000Z","updated_at":"2021-05-22T05:05:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"61192afa-9b23-4fb7-938e-f34f85c81218","html_url":"https://github.com/vinayhosamane/MasterCoredata","commit_stats":null,"previous_names":["vinayhosamane/mastercoredata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vinayhosamane/MasterCoredata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinayhosamane%2FMasterCoredata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinayhosamane%2FMasterCoredata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinayhosamane%2FMasterCoredata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinayhosamane%2FMasterCoredata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinayhosamane","download_url":"https://codeload.github.com/vinayhosamane/MasterCoredata/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinayhosamane%2FMasterCoredata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","swift"],"created_at":"2024-12-05T10:20:43.394Z","updated_at":"2026-04-27T12:02:50.476Z","avatar_url":"https://github.com/vinayhosamane.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MasterCoredata\nThis repository is to try different uses cases in coredata.\n\nIf you want to read a book on Coredata, then try this. https://www.objc.io/books/core-data/preview/\nYou will master all the techniques.\n\n- [x] Model Creation From Editor\n      \n      Remember to set the `codegen` to Manual/None, if you want control over your managed object models. Otherwise Xcode will auto-generate those models on first run.\n\n\n- [x] CRUD Operations on Coredata managed object model\n\n- [x] Fetching content from Entity\n\n- [x] Handling relationships between Entities\n\n- [x] Parent / Child Managed Object Contexts\n\n- [x] Thread safe managed object contexts\n\n- [x] Sharing managed objects between multiple contexts\n\n- [ ] Transactions In Coredata, Batch Insert / Delete\n\n- [x] NSFetchedResultsController\n      \n      If we want observe for change notifications consistently, then this is the best bet for you to use, so that we can refresh our UI.\n      \n- [ ] Best Practices\n\n- [x] Value change observers / KVO / Notifications\n\n- [x] Parent / Child context save merge policies\n\n- [ ] Resolving merge conflicts\n\n- [x] Updating entities with new attributes\n\n- [ ] Creating versions of coredata model\n\n- [ ] Light weight migration policy\n\n- [ ] Heavy weight migration with mapping model\n\n- [ ] Importing data from existing sql database\n\n- [ ] Different persistent stores\n\n- [ ] Performance tuning using faults\n\n- [x] Folder structure for coredata stack or related code across the project\n\n- [x] Logging Coredata Queries\n\n- [x] Debugging with 'DB Browser for SQLite'\n\n- [ ] Testing Coredata related code\n\n- [ ] Use of Entity Constraints\n\n- [ ] Use of Abstract Entities\n\n- [ ] Adding Fetch Index or Fetch Request\n\n- [ ] Adding Configurations\n\n## Resources\nBlock diagram whichh explains how model changes saved in parent/child contexts\n![Screenshot 2021-05-18 at 3 55 05 PM](https://user-images.githubusercontent.com/12964593/118635660-77cf2e80-b7f1-11eb-864e-906fe51aa022.png)\n\nSupporting Codable with NSManagedObject classes\nhttps://www.donnywals.com/using-codable-with-core-data-and-nsmanagedobject/\n\nObserving managed object change notifications\nhttps://www.donnywals.com/observing-changes-to-managed-objects-across-contexts-with-combine/\n\nUsing multiple managed object contexts in coredata\nhttps://www.cocoanetics.com/2012/07/multi-context-coredata/\n\nUnit of Work pattern\nhttps://martinfowler.com/eaaCatalog/unitOfWork.html\n\nCoredta Transactions\nhttps://christiantietze.de/posts/2015/10/unit-of-work-core-data-transaction/#:~:text=Transactions%20and%20Rolling%20Back%20Changes%20in%20Core%20Data%20with%20UnitOfWork,-Oct%2012th%2C%202015\u0026text=The%20Unit%20of%20Work%20pattern,changes%20and%20have%20them%20saved.\n\nCoredata progressive migrations\nhttps://kean.blog/post/core-data-progressive-migrations\n\nApple's earth quake sample project\nhttps://developer.apple.com/documentation/coredata/loading_and_displaying_a_large_data_feed\n\nThe laws of Coredata\nhttps://davedelong.com/blog/2018/05/09/the-laws-of-core-data/\n\nPredicate cheatsheet\nhttps://academy.realm.io/posts/nspredicate-cheatsheet/\n\nLife cycle of NSManagedObject\nhttps://www.avanderlee.com/swift/nsmanagedobject-awakefrominsert-preparefordeletion/\n\nConstraints in Coredata model\nhttps://www.avanderlee.com/swift/constraints-core-data-entities/\n\nNote: Coredata won't handle duplicate rows, we have to make sure to enter unique records.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinayhosamane%2Fmastercoredata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinayhosamane%2Fmastercoredata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinayhosamane%2Fmastercoredata/lists"}