I suspect that embedded class attributes which were linked to certain classes do not work, when record is updated. Im on OrientDB 2.0.x and the latest PhpOrient.
Here's the schema + test record:
create class Test extends V
create class TestInfo
create property Test.attr1 string
create property Test.attr2 embedded TestInfo
insert into Test set attr1 = "test", attr2 = { "@type": "d", "@class": "TestInfo", "subAttr1": "sub test"}
In the console:
orientdb {db=test}> select from Test
----+-----+------+-----+-----------------------------------
# |@RID |@CLASS|attr1|attr2
----+-----+------+-----+-----------------------------------
0 |#36:0|Test |test |TestInfo{@type:d,subAttr1:sub test}
----+-----+------+-----+-----------------------------------
PHP Fatal error: Uncaught exception 'PhpOrient\Exceptions\PhpOrientException' with message 'com.orientechnologies.orient.core.exception.OValidationException: The field 'Test.attr2' has been declared as EMBEDDED with linked class 'TestInfo' but the record has no class' in /home/ubuntu/shared/www/test/lib/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/Abstracts/Operation.php:412
Stack trace:
#0 /home/ubuntu/shared/www/test/lib/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/Abstracts/Operation.php(142): PhpOrient\Protocols\Binary\Abstracts\Operation->_readError()
#1 /home/ubuntu/shared/www/test/lib/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/Abstracts/Operation.php(217): PhpOrient\Protocols\Binary\Abstracts\Operation->_readHeader()
#2 /home/ubuntu/shared/www/test/lib/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/SocketTransport.php(154): PhpOrient\Protocols\Binary\Abstracts\Operation->getResponse()
#3 /home/ubuntu/shared/www/test/lib/vendor/ostico/phporient/src/PhpOrient/PhpOrie in /home/ubuntu/shared/www/test/lib/vendor/ostico/phporient/src/PhpOrient/Protocols/Binary/Abstracts/Operation.php on line 412
Hi,
I suspect that embedded class attributes which were linked to certain classes do not work, when record is updated. Im on
OrientDB 2.0.x
and the latestPhpOrient
.Here's the schema + test record:
In the console:
Executing the following throws an exception:
Error: