Skip to content

Commit

Permalink
Merge pull request lphuberdeau#78 from Deltachaos/duplicate-nodes-on-…
Browse files Browse the repository at this point in the history
…id-0

Duplicate Nodes on ID 0
  • Loading branch information
lphuberdeau committed May 20, 2014
2 parents 9296071 + 7a1e58b commit 0937a41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/HireVoice/Neo4j/EntityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private function removeEntities()
$meta = $this->getMeta($entity);
$pk = $meta->getPrimaryKey();
$id = $pk->getValue($entity);
if ($id){
if ($id !== null){
$node = $this->client->getNode($id);

if($node){
Expand Down Expand Up @@ -479,7 +479,7 @@ private function createNode($entity)
$pk = $meta->getPrimaryKey();
$id = $pk->getValue($entity);

if ($id) {
if ($id !== null) {
$node = $this->client->getNode($id);
} else {
$node = $this->client->makeNode()
Expand All @@ -494,7 +494,7 @@ private function createNode($entity)

$currentDate = $this->getCurrentDate();

if (! $id) {
if ($id === null) {
$node->setProperty('creationDate', $currentDate);
}

Expand Down

0 comments on commit 0937a41

Please sign in to comment.