Hi , i have an issue with the binary records .
when i create or read a binary record everything is ok . but when i want to delete some binary record from console or studio i achieve nothing to happended .
My Scenario is :
ODB : 2.1.11,
Hi @saeedtabrizi,
You shouldn't use the class for create blob, try to use directly clusters instead:
create cluster BlobStorage
select from cluster:BlobStorage
delete from cluster:BlobStorage
Hi @tglman , many thanks for your reply .
i'd tested it too as i said.
delete from cluster not working and returns 0 record affected after executing in studio .
i think there is a bug in this case or missing documentation for working by binary records .
@lvca , @luigidellaquila Is there any idea ?
I'd test it by 2.1.11 , the delete from cluster:BlobStorage not working on binary records .
how can i delete binary records that stored in a cluster ?
i tried also Truncate Record #15:7(it's ok and works true)
Hi @saeedtabrizi
I'm checking it. There must be a bug somewhere in the DELETE command.
In the meantime, did you try to simply do
delete from #15:7
Thanks
Luigi
Hi @luigidellaquila
thanks for reply . i tried delete from #15:7 but not working in 2.1.11 yet .
only truncate record command works true in deleting BinaryRecords .
I have an opinion for select from Binary Record in Select Command .
*_it's better select from blobstorage returns record id and record bytes size for binary records . now select from blobstorage (binary records) returns nothing *_
Thanks alot .
Hi @saeedtabrizi
We fixed this, the fix will be released with 2.1.14 and 2.2
Thanks
Luigi
@luigidellaquila
I'd tested it now in 2.1.15
when i was try to delete via delete from 15:0 command everything works well :+1:
but when i was trying to delete record from a select that contains a linked field that contains row id of my blobs , delete not working yet :
delete from (select Blob from FileItem)
also when i try to write another kind query does not working and returns error
delete from cluster:BlobStorage where @rid in (select Blob from FileItem)
returns :
java.lang.ClassCastException: com.orientechnologies.orient.core.record.impl.ORecordBytes cannot be cast to com.orientechnologies.orient.core.record.impl.ODocument
for clearing what was happened i tried to run select @rid from cluster:BlobStorage that returns nothing but when i run select from cluster:BlobStorage returns a binary record that have @ rid and @ version and a base64 encoded string field . i'm wondered now . is it a new bug ?
how can i delete binary record via a nested select where query ?
please help me to write a true delete statement .
at the last :
Actually i have an opinion for select from Binary Record in Select Command .
*it's better select from blobstorage returns record id and record bytes size for binary records . now select from blobstorage (binary records) returns nothing *
thnaks
Hi @saeedtabrizi
It seems to be another kind of problem.
I'm reopening this issue and assigning it to @tglman for a check, we will give you an answer asap
Thanks
Luigi
hi,
all this cases should be fixed in the 2.1.20, closing
Regards.