orientechnologies / orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
https://orientdb.dev
Apache License 2.0
4.74k stars 871 forks source link

.tojson() gives null as result #10264

Closed adriancoca closed 2 months ago

adriancoca commented 3 months ago

OrientDB Version: 3.2.22

Java Version: 1.8

OS: Linux Docker

Expected behavior

Should stringify node content

Actual behavior

array with null value [null]

Steps to reproduce

Example select

select routeDataNodes,routeDataNodes.tojson() as routeDataJSON
FROM ( select * from ( 
  select key,uuid as commandUuid,start_date,out("ON_ROUTE") as routeDataNodes  /*out("ON_ROUTE").tojson() as earlyjson   corect json calculated */
FROM task
WHERE  start_date >= '2024-02-05 00:00:00' and start_date <= '2024-07-02 23:59:59'
) where key="COMANDA" and commandUuid="16821cf6-4ed6-4ba3-9ceb-0654ad4f2277" )

order by start_date desc

image

tglman commented 2 months ago

Hi,

I fixed this in the last develop branches ( so also 3.2.x) and should be released with the 3.2.32 hotfix.

with the fix the two way of do toJson give the same result.

Regards

tglman commented 2 months ago

Hi, 3.2.32 has been released with the fix, feel free to check if it works ok also at your side