jessesquires / JSQCoreDataKit

A swifter Core Data stack
https://jessesquires.github.io/JSQCoreDataKit/
MIT License
616 stars 70 forks source link

Update FetchRequest #86

Closed MaxHasADHD closed 8 years ago

MaxHasADHD commented 8 years ago

Pull request checklist

Uses a cleaner FetchRequest.

codecov-io commented 8 years ago

Current coverage is 90.11%

Merging #86 into develop will increase coverage by 0.02%

@@            develop        #86   diff @@
==========================================
  Files            13         13          
  Lines           434        435     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            391        392     +1   
  Misses           43         43          
  Partials          0          0          

Sunburst

Powered by Codecov. Last updated by 5413b36...1bf6f9e

jessesquires commented 8 years ago

Thanks @MaxHasADHD ! 😄

This isn't quite the direction that I think we should take the library.

I've opened #87 to track this. 😊

MaxHasADHD commented 8 years ago

I'm watching the talk right now! I'm currently reading his book as well. Just wondering though, would "\(self.self)" ever be wrong? Or just maybe in the future it could change to not be the entities name like I expect?

jessesquires commented 8 years ago

Or just maybe in the future it could change to not be the entities name like I expect?

Exactly.

With Daniel's approach, we can have the classes provide an entityName.

Then, we might be able to provide a default implementation that returns "\(self.self)" (or similar). This way, we could provide good defaults, but allow clients to override. 😄

MaxHasADHD commented 8 years ago

I like that idea! I'm going to implement this into my project :) Thanks

jessesquires commented 8 years ago

We'll provide more of these kinds of things in this library soon 😊

saurabytes commented 8 years ago

safer to use "\(self.dynamicType.self)" also get rids of the module name and will leave you with the class name which is in most case is the entity name