を
var g=orient.getGraphNoTx();
var books=g.command("sql","select from Book");
var authors=g.command("sql","select from Author");
g.command("sql","create property Book.authors Link Author");
for(i=0;i<books.length;i++){
var book_author=books[i].getProperty("author");
for(j=0;j<authors.length;j++){
var author=authors[j].getProperty("name");
if(author==book_author){
var query="update " + books[i].getId() + "set authors = " + authors[j].getId();
g.command("sql",query);
}
}
}
g.command("sql","DROP PROPERTY Book.author FORCE");
g.command("sql","UPDATE Book REMOVE author");
g.command("sql","ALTER property Book.authors name author");
g.command("sql","UPDATE Book REMOVE authors");
![enter image description here](https://i.stack.imgur.com/I60Td.png)
私が移行したJavaScriptで関数をやっている、あなたは、グラフとして、あるいは文書としてあなたのDBを使用していますか? –