Discussion Javier Llobet · Jul 8, 2020

I was trying the %JSON.Adapter backport to cache and try it also in IRIS and i found a kind of an issue regarding to export and object to json that is an inheritance of %ListOfObjects
If we have a list of elementtype of and object and then we try to export this to a json we get this json instead of a correct json.

exported json:

{
  "ElementType":"test.element",
  "Size":"1"
}

Json that we want:

[
  {
    "field1":"testField1",
    "field2":"testField2"
  }
]

Test classes:

3
0 747
Question Javier Llobet · Feb 26, 2019

I try to create a column with computeonchange. 

Its works with CREATE TABLE sql command, but if i use ALTER TABLE ADD COLUMN sql command this computeonchange doesn't works.

any reason why?

example:

CREATE TABLE MyStudents (   Name VARCHAR(16) NOT NULL,   surname VARCHAR(16))

alter table MyStudents add column fullname Varchar(50) COMPUTECODE { SET {fullname}={Name}_ "?" _{surname}} COMPUTEONCHANGE (Name,surname)  

insert into SQLUser.MyStudents (Name, surname) values ('name1',null)

update MyStudents set name = 'name' where name = 'name1'

this not updates fullname column value....

1
0 256