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.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2755 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.