Closed alaimos closed 9 years ago
Hi Salvatore, i tried your script and you are right, the linkset of rids are not correctly handled when writing to the data stream.
I followed your suggestion, the patch you provided works fine.
Thank you.
P.S. In your test there is an error on this line:
print_r( $record->prova2 );
## produce an exception not related with PhpOrient
## exception 'OutOfBoundsException' with message 'prova2 key does not exists.'
## it should be
/**
* @var \PhpOrient\Protocols\Binary\Data\Record $record
*/
print_r( $record->getOData() );
## or
print_r( $record->aLinkedSetOfProva1 );
## Actual result
/*
Array
(
[aString] => Test record
[anEmbeddedSetOfString] => Array
(
[0] => something 1
[1] => something 2
[2] => more other
)
[aLinkedSetOfProva1] => Array
(
[0] => PhpOrient\Protocols\Binary\Data\ID Object
(
[cluster] => 9
[position] => 1
)
[1] => PhpOrient\Protocols\Binary\Data\ID Object
(
[cluster] => 9
[position] => 2
)
)
)
*/
PHP Code to reproduce bug:
_Expected Result:_
_Actual outcome obtained after code execution:_
_Output of "select * from Prova2":_
_Environment:_
_Proposed fix:_
In class \PhpOrient\Protocols\Binary\Serialization\CSV line 514 following:
add: