Core Data – Search Core Data Enders in Insert Sequence

Can I use internal ID variables or timestamps in NSSortDescriptor to retrieve Core Data entities in insertion order?

If there is a cleaner way, I would rather not have to create such an attribute, but if there are no other options, I will obviously do it.

No, if you want the sort order of the data, you need to add it to the entity yourself. However, you can easily add a default value of “NOW”

Can I use internal ID variables or timestamps in NSSortDescriptor to retrieve Core Data entities in insertion order?

If there is a cleaner way, I would rather not have to create such an attribute, but if there are no other options, I will obviously do it.

No, if you want the sort order of the data, you need to add it to the entity yourself. However, you can easily add an NSDate attribute with a default value of “NOW” so that it is automatically filled.

Leave a Comment

Your email address will not be published.