Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Multiple Contexts Support #77

Closed
wants to merge 4 commits into from
Closed

Multiple Contexts Support #77

wants to merge 4 commits into from

Conversation

remaerd
Copy link

@remaerd remaerd commented Feb 27, 2014

Hello.

I'm facing multiple contexts issue for a long time. I need to have an persistent Store and an InMemory Store in my app. I like ObjectiveRecord, But the useInMemoryStore isn't the solution. So I make up my mind to do something about it.

I added the manageObjectContexts dictionary and related methods into ObjectiveRecord. So I can Add / Remove Contexts into ObjectiveRecord; Fetch / Find objects from multiple contexts with an identifier; Move / Copy objects between contexts.

I'm not used to do testing on my code. So these changes are not tested yet. I make this merge to the master branch so I can know what you guys think about these changes.

Cheers.

@supermarin
Copy link
Owner

Hi Sean, unfortunately this is not the philosophy of ObjectiveRecord - it's meant to provide you a small and simple API for finders & creators.

We're going through some design changes/considerations ATM, so we can't merge this at this point.
Thank you very much for your work, there's still a possibility to revisit this in the future.

@supermarin supermarin closed this Mar 25, 2014
@remaerd
Copy link
Author

remaerd commented Mar 26, 2014

The reason I use ObjectiveRecord is the simplicity of it. I can understand you cannot merge it. I’m just trying to show what I think about ObjectiveRecord is in my opionon.

I make so many changes in this merge, I don’t expect it can be merge. Although there are lot of changes in these merge, previous code still works. I was considering adding a new Database Class into the framework, but changing the current methods only.

The CoreData’s Persistent store, coordinate, context is really complicated to understand. It’s would be nice to simplify those stuff into a new ‘Database ’ Class. I was considering [ORDatabase defaultDatabase], [ORDatabase imMemoryDatabase] would be nice to add into the framework. But it will change the way how ObjectiveRecord works.

It’s would be nice to see upcomming new features if there’s a 2.0 going on here. I was just worried about you will spend more time on the Alcatraz but ObjectiveRecord.

Cheers.

@stephencelis
Copy link
Collaborator

@remaerd There's an experimental branch recently started here: https://github.com/supermarin/ObjectiveRecord/tree/2-0-experimental

It will be in flux. Please see the issues here for discussion, including #88.

We may want to start a new issue to track 2.0 discussion. /cc @supermarin

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

Successfully merging this pull request may close these issues.

3 participants