I use CoreData to store book information stored in an SQLite database. When sorting by title, I would like to ignore the prefixes "A" and "The". For example, when you have books: Codebook and Farm riddle, I want Fermat Enigma to appear before Codebook because The should be ignored.
I could not find any way to do this, except to add a persistent property that would contain a header without prefixes. (In the example above, this property says that "titleNoPrefixes" should contain the string "Codebook"). Sorting based on calculated properties (such as transient properties) is not possible in CoreData.
Adding a persistent property is obviously a bad database design, but I don't see another way. Any suggestions?
source share