Spring-data Neo4J:保存节点而不更新关系中的节点?

时间:2019-01-05 17:30:40

标签: neo4j spring-data spring-data-neo4j neo4j-ogm

我有那些实体:

@implementation AppDelegate
{
    MPVolumeView* mv;
    UISlider* slider;
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    return YES;
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    slider.value = 1;
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    mv = [MPVolumeView new];
    for (UIView *view in [mv subviews]){
        if ([view.class.description isEqualToString:@"MPVolumeSlider"]){
            slider = ((UISlider*)view);
            break;
        }
    }
}

@end

当我使用WS将新的ListElement添加到ManagedList时,我传递的是仅具有ManagedListId的ListElementDTO中强制转换的json,因此,当ListElementDTO与ListElement实体进行映射时,ManagedList对象仅具有其ID,名称为==空。

以前,我使用Mysql,当我保存ListElement时,它已与ManagedList正确关联,并且ManagedList对象在数据库中仍具有他的名字。

但是现在使用Neo4J数据库,当我保存ListElement时,它将更新ManagedList对象并将名称设置为null。

有什么方法可以指定当我保存ListElement时我不想更新ManagedList,而是仅使用ManagedList id来关联它们,就像它在Mysql中发生的那样?

Thx

0 个答案:

没有答案
相关问题