Ostico / PhpOrient

PhpOrient - Official Php driver based on the binary protocol of OrientDB.
Other
68 stars 37 forks source link

recordUpdate deletes edges? #20

Closed andreyvk closed 9 years ago

andreyvk commented 9 years ago

Hi,

Im using OrientDB 2.0.7 with PhpOrient 1.1.7. After I execute the following piece of code, my record loses all its edges:

Given:

orientdb {db=dbname}> select from #20:46
----+------+--------+----+--------+------------------------------------+---------+--------+-----------
#   |@RID  |@CLASS  |name|category|id                                  |isDeleted|out_has |out_belongs
----+------+--------+----+--------+------------------------------------+---------+--------+-----------
0   |#20:46|Test    |TEST|cat1    |b12557b4-097e-486f-ae29-e4da9a1a1065|false    |[size=2]|[size=1]
----+------+--------+----+--------+------------------------------------+---------+--------+-----------

Then we execute:

//$db is PhpOrient client instance 
//...
$rec = $db->recordLoad(new ID("#20:46"))[0];
$db->recordUpdate($rec);

After that in the console:

orientdb {db=midev}> select from #20:46
----+------+--------+----+--------+------------------------------------+---------+--------+-----------
#   |@RID  |@CLASS  |name|category|id                                  |isDeleted|out_has |out_belongs
----+------+--------+----+--------+------------------------------------+---------+--------+-----------
0   |#20:46|Test    |TEST|cat1    |b12557b4-097e-486f-ae29-e4da9a1a1065|false    |null    |null
----+------+--------+----+--------+------------------------------------+---------+--------+-----------

Is this an expected behavior?

Ostico commented 9 years ago

I think not, but i have to investigate.

Thank you for reporting it.

andreyvk commented 9 years ago

Np. Hope nothing serious

andreyvk commented 9 years ago

Hi @Ostico,

Any news on the issue?

andreyvk commented 9 years ago

Thanks @Ostico! Looks like it's all good here now.