私はCoreDataでちょっと新しく、自分のモデルに何が間違っているのか理解できません。私は店のコーディネーターに永続ストアを追加しようとしているときにエラーが発生します。ここではCore Dataモデルに何が問題がありますか?
NSPersistentStore *persistentStore = [self.persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:error];
は、ログおよびエラーです:
> CoreData: sql: CREATE TABLE ZMANAGEDOBJECT (Z_PK INTEGER PRIMARY KEY,
> Z_ENT INTEGER, Z_OPT INTEGER, ZSECTION.ARTICLES INTEGER, ZTITLE
> INTEGER, ZBOOK.AUTHOR INTEGER, ZNAME INTEGER, ZAUTHOR INTEGER,
> ZPUBLISHER INTEGER, ZSUBTITLE INTEGER, ZTITLE1 INTEGER, ZAUTHOR1
> INTEGER, ZTEXT INTEGER, ZTITLE2 INTEGER, Z_FOK_SECTION.ARTICLES
> INTEGER, ZCREATEDAT TIMESTAMP, ZUPDATEDAT TIMESTAMP, ZID_ VARCHAR,
> ZTYPE BLOB, ZCONTENT BLOB, ZATTRIBUTES BLOB, ZCOVER BLOB, ZIMAGE BLOB
>)
> CoreData: annotation: Disconnecting from sqlite database due to an
> error.
> CoreData: error: (1) I/O error for database at
> /Users/firuznarzikulov/Library/Application
> Support/BahaiAppAdmin/BahaiAppAdmin.sqlite
Error Domain=NSCocoaErrorDomain Code=256 "The file couldn’t be
opened." UserInfo={NSSQLiteErrorDomain=1, NSUnderlyingException=I/O
error for database at /Users/user/Library/Application
Support/App/database.sqlite. SQLite error code:1,
'near ".": syntax error'}
ManagedObject
は抽象的なエンティティであり、LocalizedString
以外のすべてのエンティティの親でもあります。
ご協力いただきありがとうございます。
うん、助けて! )ダミーミス。ありがとう兄貴! –