找不到源商店的模型 [英] Can't find model for source store
问题描述
我是不熟悉C语言开发的新手.在继承别人的项目中.
I am new to objective C development. In inherited someone else's project.
我看到在他的项目中,他有一个名为Model的文件夹.其中是文件
I see that in his project, he has a folder called Model. In it are the files
Product.h
Product.m
Compatible.h
Compatible.m
Model.h
Model.m
MyProject.xcdatamodeld
几天前,按照在Product.h和Product.m中看到的编码样式,我创建了两个新文件,分别称为Warehouse.h和Warehouse.m.我还在Model.h和Model.m中编写了一些函数,这些函数可以帮助我获取新的Warehouse.然后,通过在XCode中打开该文件,单击添加实体",重命名该实体并添加必要的属性,在MyProject.xcdatamodeld中创建了一个新实体.
A few days ago I created two new files called Warehouse.h and Warehouse.m, following the style of coding I saw in Product.h and Product.m. I also wrote some functions in Model.h and Model.m that helped me grab new Warehouses. I then created a new Entity in MyProject.xcdatamodeld by opening that file up in XCode, clicking Add Entity, renaming the entity and adding the necessary attributes.
我能够在项目的其余部分中使用这个新的类/模型.
I was able to use this new class/model in the rest of my project.
今天,我决定在Warehouse.m中添加一些新属性.然后,通过单击新属性按钮,将新属性添加到MyProject.xcdatamodeld中.
Today, i decided to add some new properties to my Warehouse.m. I then added new attributes to the MyProject.xcdatamodeld by clicking on the new attribute buttons.
现在我的项目在启动时就崩溃了,给了我错误Can't find model for source store
.
Now my project crashes right when it starts up, giving me the error Can't find model for source store
.
我做错什么了吗?我隐约记得有人告诉我这是模型更改的令人头疼的事情.有人可以推荐我阅读该主题吗?以及我该如何解决我的情况?
Am I doing something wrong? I vaguely remember someone telling me it's a headache of the model changes. Can someone recommend me reading on the subject matter? And how i can fix my situation?
推荐答案
我去了MyProject.xcdatamodeld.然后单击左侧导航中的配置".然后我注意到一个显示以下内容的表:
I went to MyProject.xcdatamodeld. Then clicked on "Configuration" in the left navigation. Then I noticed a table showed up with the following contents:
Entity Abstract Class
Compatible un-checkbox Compatible
Product un-checkbox Product
Warehouse un-checkbox
我注意到Warehouse行没有Class的值.因此,我在其中输入了Warehouse.然后一切正常.
I noticed that the Warehouse row didn't have a value for Class. So i typed in Warehouse in to it. Then everything worked.
这篇关于找不到源商店的模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!