Questions tagged [fetched-property]

30 questions
25
votes
3 answers

does anyone have a working example of a fetched-property in core-data?

I have tried to use fetched properties a couple of times, and although it seems to be the right approach, it never works. In my latest attempt I added the fetched-property to my entity, selected the other entity in the model as the 'destination',…
user576924
22
votes
8 answers

How to sort Core Data fetched properties

The Core Data Documentation states that: The fetch request associated with the [fetched] property can have a sort ordering, and thus the fetched property may be ordered. How do I specify the sort descriptors for the fetched property in Xcode's…
Daniel Dickison
  • 21,832
  • 13
  • 69
  • 89
11
votes
1 answer

Fetched Property in XCode Data Model Editor for minimum value

How do I add a Fetched Property in XCode's Data Model Editor for minimum value of one attribute?? My model: Model http://www.freeimagehosting.net/uploads/b48853070e.png Item (name, note, storedItem) StoredItem (price, item) Item 1 ---> N StoredITem…
wal
  • 2,044
  • 3
  • 18
  • 22
6
votes
1 answer

Core Data get sum of values. Fetched properties vs. propagation

I'm relatively new to Core Data (coming from an SQLite background). Just finished reading the 'Core Data for iOS' book but I'm left with a number of baffling questions when I started modelling an app which has the following model: 'Accounts' entity…
strange
  • 9,654
  • 6
  • 33
  • 47
3
votes
1 answer

Core Data background sorting

I have a Department entity which has a one-to-many relationship to an Employee entity. During runtime, for each Department object I want to maintain a sorted array of Employee objects (sorted according to some attribute) which will be used as a…
3
votes
1 answer

Average as a fetched property?

I'm not sure if I've understood Fetched Properties correctly, so do tell me if I'm going the wrong way with this and should be doing something else instead. I have a little demo app where I have books that are being reviewed. A Review entity has a…
niklassaers
  • 8,480
  • 20
  • 99
  • 146
3
votes
1 answer

How do ensure that a Core Data Fetched Property is fetched from the context rather than the cache?

I have a managed Object Model that contains 2 Entities. One of the entities (Lets Call it EA) calculates it's properties by referencing some properties in a sub-set of the second entity (Call it EB). Within EA I have set up a "Fetched Property" with…
SimonB
  • 610
  • 8
  • 17
2
votes
2 answers

core data fetched properties and NSFetchedResultsController

I read this in the core data programming guide: In many cases, your initial fetch retrieves a starting node in the object graph and thereafter you do not execute fetch requests, you simply follow relationships. This makes sense if everything is…
bandejapaisa
  • 26,576
  • 13
  • 94
  • 112
2
votes
0 answers

Core Data - Fetched Property with bitmasks and abstract entities

(Data models renamed to preserve anonymity. :D ) So, I have a situation where on a Thing, whose configuration is defined by its own special object, though that object can be one of 2 class types. I would like to be able to do Fetch Requests on…
horseshoe7
  • 2,745
  • 2
  • 35
  • 49
2
votes
0 answers

iOS 7 CoreData - FetchedProperty returns faulting array

maybe someone could tell me if i am on the right way. I have two entities: Exercise with following attributes: title - string ; exercise_id - int AddedExercise with following attributes: count - int ; added_exercise_id - int The AddedExercise has a…
Steffen Ruppel
  • 331
  • 2
  • 11
2
votes
1 answer

Does core data refresh data model with a delay?

I faced with a problem that the core data don't see any changes in my predicate when I'm tryin to modify it. I spent alot of time trying to find why doesn't my fetched property show me the correct results (see code below) and finally after another…
kas-kad
  • 3,736
  • 1
  • 26
  • 45
2
votes
0 answers

NSFetchRequest with recursive criteria or recursive Fetched Property

In a sqlite based core data storage I have 2 entities: Item and Tag. Item has a many to many relationship to Tag. Tag also has a recursive relationship for one parent tag. Hence tags form a tree. Now I want to create a NSPredicate to fetch all items…
1
vote
3 answers

Fetched Property in core data returning improper count

I have a core data relationship that looks like this ItemA ->> ItemB where as itemA has many of itemB. i wanted to use a fetched property that allowed me to grab all associated of itemB that were associated with itemA that had an int32 status…
Kyle Kinkade
  • 169
  • 1
  • 13
1
vote
1 answer

i18n in iOS Core Data

I'm working on a localized schema for iOS. I have different Entities that can have translated fields, so for each one I create a Translation entity. There is always a one-many relation between the two entities, allowing me to add new languages in…
eillarra
  • 5,027
  • 1
  • 26
  • 32
1
vote
2 answers

How do I create an NSFetchedPropertyDescription programmatically?

I have a pre-existing NSManagedObjectModel that I created with the Xcode GUI. I want to create a sorted fetched property, which Xcode 3.2's GUI doesn't support. I do all of this before creating my NSPersistentStoreCoordinator because I know you…
Heath Borders
  • 30,998
  • 16
  • 147
  • 256
1
2