Hello first post here,
I have a doubt of how to implement this, i have 3 managed objects MailFolder, MailFoldersInfo and Mail.
MailFolder are, as the name suggests, the folder related info, the folder name, a lastdate update field for the last date folder’s email sync and of course a relationship with Mail(optional and To-any).
Mail, has subject, body, other fields more and a relationship with MailFolder(NON-optional).
But now i have MailFoldersInfo with a field called lastsync date type, that needs to be the last sync date when all the MailFolders list were updated, how do i set a relationship like that, i don’t have an idea how to do this on SQL neither.
Can somebody enlight me with this?
Thanks
It seems that MailFoldersInfo is a record you want to keep to maintain information about all mail folders. This seems to be a singleton object for a database. You do not need a database entity to manage one object. You can use NSUserDefaults to have the information such as lastsync date. If you need more information, you can either calculate the value based on the mail folders, or save some more on NSUserDefaults, or even create a plist file on your document directory.