0
내 코드는 배열에서 동일한 값 (마지막 코드)을 두 번 삽입합니다. 왜 ? 많은 행을 삽입하는 방법은 존재하지만 존재하지 않는 경우에만?Node.js orm2가 루프의 요소를 만듭니다.
for x of species # two elements 36 and 37
data = { movie_id : id, species_id : species[x].id }
console.log data
MovieSpecies.exists data, (err, exists) ->
if exists == false
MovieSpecies.create data, (err, items) ->
console.log items
출력을 'MovieSpecies'의 정의와 공유 할 수 있습니까? –