-
-
Notifications
You must be signed in to change notification settings - Fork 94
Description
ArcadeDB Version:
23.6.1
Expected behavior
Providing data for a (?,?,?) parameters based insert query shouldn't need names on the fields (it didn't in Orient) and an ability to supply a JSON object for an EMBEDDED data type. Furthermore data appears to be inserted but isn't visible in the Web interface.
Actual behavior
-
When inserting using INSERT and passing a 'params' attribute, if you omit the key for an insert field or (2) try to insert an array into an EMBEDDED field type, you get the error
class java.util.ArrayList cannot be cast to class java.util.Map -
Furthermore running the following query produces an entry in the Companies table but no visible data.
Steps to reproduce
Create an INSERT statement with parameters and pass in an array of elements without field names. Furthermore, try to supply a JSON object as one of the values for an EMBEDDED field type.
-
{"language":"sql","command":"INSERT INTO Companies (CompanyID,CompanyName,CountryID) VALUES (?,?,?)","params":[123,"Test company",826]}
-
{"command":"UPDATE
CompaniesSETSocialAccounts= ? WHERE @Rid = 'GIVEN_ID'","language":"sql","params":[{"SocialAccounts":[{"Url":"https://www.facebook.com/","Type":"fb"},{"Url":"https://www.linkedin.com/","Type":"li"}]}]} -
{"language":"sql","command":"INSERT INTO Companies (CompanyID,CompanyName,CountryID) VALUES (?,?,?)","params":{"CompanyID":123,"CompanyName":"Test company","CountryID":826}}