{"id":18271649,"url":"https://github.com/karelia/KSExtensibleManagedObject","last_synced_at":"2025-04-05T02:30:37.244Z","repository":{"id":975445,"uuid":"774227","full_name":"karelia/KSExtensibleManagedObject","owner":"karelia","description":"KSExtensibleManagedObject","archived":false,"fork":false,"pushed_at":"2014-08-08T20:18:06.000Z","size":690,"stargazers_count":26,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-03T05:34:47.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.mikeabdullah.net/ksextensiblemanagedobject.html","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karelia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-07-14T09:35:18.000Z","updated_at":"2020-07-23T06:40:45.000Z","dependencies_parsed_at":"2022-07-18T17:00:48.189Z","dependency_job_id":null,"html_url":"https://github.com/karelia/KSExtensibleManagedObject","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karelia%2FKSExtensibleManagedObject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karelia%2FKSExtensibleManagedObject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karelia%2FKSExtensibleManagedObject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karelia%2FKSExtensibleManagedObject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karelia","download_url":"https://codeload.github.com/karelia/KSExtensibleManagedObject/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246981170,"owners_count":20863827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-05T11:39:26.094Z","updated_at":"2025-04-05T02:30:36.285Z","avatar_url":"https://github.com/karelia.png","language":"Objective-C","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"Features\n========\n\n`KSExtensibleManagedObject` extends `NSManagedObject` to support dictionary-like storage of non-modelled properties. This is particularly useful in situations where you want to extend your managed object model slightly, but can't or don't want to perform a migration of existing persistent stores.\n\nContact\n=======\n\nI'm Mike Abdullah, of [Karelia Software](http://karelia.com). [@mikeabdullah](http://twitter.com/mikeabdullah) on Twitter.\n\nQuestions about the code should be left as issues at https://github.com/karelia/KSExtensibleManagedObject or message me on Twitter.\n\nDependencies\n============\n\n* No library dependencies beyond Core Data\n* Works back to OS X v10.5.\n* **BUT**, support for KSExtensibleManagedObject **MUST** be baked into your managed object model **BEFORE** shipping; see Usage below for full details\n\nLicense\n=======\n\nCopyright © 2007 Karelia Software\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\nUsage\n=====\n\nWhen designing your managed object model, for any entities that you think you might want extensible property support for in the future, add an extra `data` attribute. By default `KSExtensibleManagedObject` assumes this attribute is named `extensiblePropertiesData`, so you likely want to match that. But if not, override `+extensiblePropertiesDataKey` to supply your own name.\n\nNote that so far, you haven't needed the `KSExtensibleManagedObject` class itself. When/if you *do* require its functionality:\n\n1. Add `KSExtensibleManagedObject.h` and `KSExtensibleManagedObject.m` to your project. Ideally, make this repo a submodule, but hey, it's your codebase, do whatever you feel like.\n2. Make `KSExtensibleManagedObject` the superclass of your custom managed object's class\n3. Call `-setExtensibleProperty:forKey:` or `-removeExtensiblePropertyForKey:` to modify the extensible property storage. Note that values must adopt `NSCoding` to be stored\n4. Use `-extensiblePropertyForKey:` and `extensibleProperties` to retrieve values\n\nYou can go further if desired and turn on KVC and KVO (Key Value Observing/Coding) support for non-modelled keys by overriding `-usesExtensiblePropertiesForUndefinedKey:` in your custom subclass.\n\nSee the `KSExtensibleManagedObject.h` for a few other possibly helpful advanced goodies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarelia%2FKSExtensibleManagedObject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarelia%2FKSExtensibleManagedObject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarelia%2FKSExtensibleManagedObject/lists"}