yepher / CoreDataUtility

An OSX application that simplifies development and debugging of CoreData enabled applications.
519 stars 49 forks source link

Add possibility to see model fetch requests #10

Closed delebedev closed 11 years ago

delebedev commented 11 years ago

Current state of affairs:

To be done:

513a70b1e4b042563c9ff86b

yepher commented 11 years ago

Yes, it makes sense to me that the fetch request details would be available by right clicking on the fetch request item.

By the way right clicking on "FECTCH REQUESTS" and selecting the menu item "Entity Info" causes a stack trace.

delebedev commented 11 years ago

Yep, it's not done yet. By the way, what should the app display in the right table when fetch request is selected?

yepher commented 11 years ago

I guess I need to understand the UI flow a little better.

Is the plan for the user to select an "Entity" first and then the "Fetch Requests" section will get populated based on the entity selected?

If so I think the EntityDataTableView should show the result of the Entity, Fetch Request + any Filter.

_OR_ (This is what I originally thought that section was for but now I think it is the previous case)

The user will create a predicate and save it for later use. Once saved it will appear in the "Fetch Request" section.

I guess this is the same answer as above. It should show the result of the entity/fetch request (filter) combination.

delebedev commented 11 years ago

Now I'am a little confused with the variety of flows:)

These 'FETCH REQUESTS' are taken from original *.mom file and are readonly. So, as I see the UI flow now, according to your comments:

  1. 'FETCH REQUESTS' is populated from mom file
  2. The user selects it by left click -> right table is updated and fetch results are displayed
  3. The user right clicks the item and gets popup with requests details

What do you think?

yepher commented 11 years ago

I always do my fetch requests in code so I am not an expert on this so I will have to play with this a little. This is my current understanding of how "FETCH REQUESTS" work.

A "FETCH REQUEST" that you build in the core data editor is associated with a specific entity. So that is why I was asking if you would first select the entity and then select the fetch requests that contain that entity.

I quickly created a "FETCH REQUEST" in the UI an this is what it looked like:

fetch_requests

Is there a way to associate a fetch request with multiple entities?

delebedev commented 11 years ago

As far as I know there is no possibility to associate a request with multiple entities.

you would first select the entity and then select the fetch requests that contain that entity.

I think this step will not be required, because we can list all the fetches (just like in Core Data editor) without selecting particular entity.

yepher commented 11 years ago

Yes, you are correct. Sorry for the confusion.

So when the user selects the "FETCH REQUEST" the data in the EntityDataTableView will be the resulting list of data from the fetch request + any addition filters the user may want to apply.

delebedev commented 11 years ago

Please advice with TODO's at the bottom of MFLMainWindowController.m https://github.com/garnett/CoreDataUtility/commit/9e9e9b0f60bb699addd07538ad9b41ca70c7555f

delebedev commented 11 years ago

It's finished now. Please review and merge.

yepher commented 11 years ago

Thanks I will review, merge and test.

yepher commented 11 years ago

This has been merged. I opened an issue related to Fetch Request. See issue #17 for more details.