与预填充的 sqlite 的核心数据关系 [英] Core data relationship with prepopulated sqlite

查看:32
本文介绍了与预填充的 sqlite 的核心数据关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,对不起.我英语不好.嗨.我是 iOS 初学者.

First of all, Sorry. I'm not good at English. Hi. I'm beginner of iOS.

目前我是这样开发的:

  1. 删除自动生成的核心数据 sqlite 文件
  2. 使用 firefox sqlite 管理器将我创建的 sqlite 文件复制到已删除的 sqlite 文件路径
    (sqlite 使用 Z_PK、Z_ENT、Z_OPT)

两个问题:

  1. 如何使用 Firefox sqlite 管理器创建实体关系.
  2. 在详细核心数据选项(例如关系删除规则、sqlite 管理器上的属性属性或其他任何内容)的情况下如何预创建.

推荐答案

嗯,基本上你需要获取一个由你的项目使用你的模式创建的空数据库,然后操作它来保存你想要的数据想要.更多信息这里

Well, basically you need to get a hold of an empty database that was created by your project using your schema, and then manipulate it to hold the data that you want. More info here

链接中未描述的替代方法是使用 Core Data 本身(以及一个用于读取其他数据库的 SQLite 库)将数据从您的数据库复制到 Core Data 数据库中.

The alternative method, which is not described in the link, is copying the data from your database into the Core Data database using Core Data itself (and a SQLite library to read the other database).

这篇关于与预填充的 sqlite 的核心数据关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆