English 中文(简体)
核心数据制图模型辛奈
原标题:CoreData Mapping Model syntax to change a relationship

DBv1

植被与模式1有着多对一的关系。 i.e. Widget.model1, Model1.widgets。

DBv2

需搬迁植被,以便它们与模型2有着多对一的关系。 模型2与模式1(在非行两种版本中)有一对一的关系。 i.e. Widget.model2, Model2.widgets, Model2.model1s, Model1.model2

我试图将Widgets模式2与诸如:

FUNCTION($manager, "destinationInstancesForEntityMappingNamed:sourceInstances:" , "Model2ToModel2", $source.model1.model2)

The logic being that the original record $source has a model1 relationship, which in turn has a model2 relationship, so I m trying to grab the model2 via the original model1.

All the relationships end up as NULL. Any help would be much appreciated.

最新资料: 使关系(全心全意)更加明确:

DBv1

Model2 - has many Model1s

Model1 - has many Widgets

DBv2

Model2 - has many Model1s - has many Widgets

i.e. 我想将植被关系从模式1提高到模式2。

问题回答

The model2 relationship on Widget was specified as optional. This evidently means that the migration won t be run for that property. You don t appear to get any feedback either.

因此,这项工作按预期进行。 如上文所述,在模型中确定新的特性,并确定移徙分布图。





相关问题
Copy data from Access to SQL

I am in the process of migrating an existing Access database to a SQL database with a web front-end. I have successfully copied the database to SQL using the SQL Server Migration tool and am working ...

MongoMapper and migrations

I m building a Rails application using MongoDB as the back-end and MongoMapper as the ORM tool. Suppose in version 1, I define the following model: class SomeModel include MongoMapper::Document ...

Switching to WPF. Is it time?

I m considering switching from MFC to WPF. My first concern is that there are too many users who don t have .NET with WPF installed yet. Can anybody point to a source containing the WPF penetration ...

rake db:migrate running all migrations correctly

I m fairly new to Ruby on Rails here. I have 2 migrate files that were provided. The first one, prefixed with 001, creates a table and some columns for that table. The next migrate file, prefixed ...

Migrate Java Applet to what/where?

I am reviewing currently a medium size code base (around 30K LOC) which uses a huge Applet and interfaces with other systems. It s a tool to create custom labels, so we need drag-n-drop and other ...

热门标签