小编Jos*_*uer的帖子

ngrx商店4选择不工作

我整天都在努力让我的Angular应用程序与ngrx/store 4一起工作.经过多次不成功的工作,我决定创建一个新的绝对最小应用程序来检查我是否还有其他问题.但最小的应用程序根本不工作:(

在Chrome Redux devtools中我可以看到,商店已正确更新.但UI未更新.此外,app.component.ts(this.age$.subscribe(console.log))中的日志语句永远不会执行.我真的不知道我错过了什么.

这是相关的代码.

的package.json

{
  "dependencies": {
    "@angular/animations": "^4.2.4",
    "@angular/common": "^4.2.4",
    "@angular/compiler": "^4.2.4",
    "@angular/core": "^4.2.4",
    "@angular/forms": "^4.2.4",
    "@angular/http": "^4.2.4",
    "@angular/platform-browser": "^4.2.4",
    "@angular/platform-browser-dynamic": "^4.2.4",
    "@angular/router": "^4.2.4",
    "@ngrx/store": "^4.0.2",
    "@ngrx/store-devtools": "^4.0.0",
    "rxjs": "^5.4.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@types/node": "^8.0.22",
    "typescript": "^2.4.2"
  }
}
Run Code Online (Sandbox Code Playgroud)

app.module.ts

import { AppState } from './state';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { StoreModule } from '@ngrx/store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools'
import { …
Run Code Online (Sandbox Code Playgroud)

angular ngrx-store-4.0

5
推荐指数
1
解决办法
5823
查看次数

DSE Graph with Java Driver,如何添加边缘

我想用Datastax Java Driver完全构建一个图形.我设法插入顶点,但我不知道如何将边添加到现有顶点.

当我运行以下代码时

session.executeGraph("parent = g.V().has('businessId','sys-1').next()");
session.executeGraph("child = g.V().has('businessId','sys-2').next()");
session.executeGraph("parent.addEdge('consistsOf', child)");
Run Code Online (Sandbox Code Playgroud)

我得到一个例外

Exception in thread "main" com.datastax.driver.core.exceptions.InvalidQueryException: No such property: parent for class: Script285
    at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:50)
    at com.datastax.driver.dse.DriverThrowables.propagateCause(DriverThrowables.java:29)
    at com.datastax.driver.dse.DefaultDseSession.executeGraph(DefaultDseSession.java:77)
    at com.datastax.driver.dse.DefaultDseSession.executeGraph(DefaultDseSession.java:64)
    at de.pratho.valpro.tools.Main.main(Main.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: No such property: parent for class: Script285
    at com.datastax.driver.core.Responses$Error.asException(Responses.java:136)
    at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:179)
    at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:173)
    at com.datastax.driver.core.RequestHandler.access$2500(RequestHandler.java:43)
    at com.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:788)
    at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:607)
    at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1012)
    at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:935)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266) …
Run Code Online (Sandbox Code Playgroud)

java gremlin datastax-enterprise datastax-java-driver datastax-enterprise-graph

2
推荐指数
1
解决办法
962
查看次数