#Object Data Model

0 Followers · 499 Posts

An object data model is that data or code is composed of modules that combine data and procedures that work on the data.

Learn more.

Question Hieu Dien Nguyen · Oct 4, 2018

Hi everyone,

I need submit a object have a json string as property of class, but I get an issue, object can't save to SQL table if I take json data to json property. I try making a test class with only json property and get the same issue, no data row in SQL table after run ClassMethod . Some one know what's problem, please help me. Here my test class:

2
0 860
Question Julie Marulappa · Sep 27, 2018

I have an http adapter that calls out to a web service and is looking for a "Completed" response. I want the adapter to wait a certain number of seconds before calling out again to get a response. I have tried setting the retry interval on the business operation but that does not do it. See my code below.

While pResponse.StringValue = "Processing" {
set tSC=..Adapter.PostURL(tURL,.tHTTPResponse,,tId)
do tHTTPResponse.Data.Rewind()
set pResponse.StringValue = tHTTPResponse.Data.Read(3000000,.tSC)
$$$TRACE("Second Response: "_pResponse.StringValue)
}

5
0 574
Question Alexey Maslov · Sep 28, 2018

There are some classes in our code base that contain Methods only (no properties). I told my colleagues that converting them into the ClassMethods should improve performance as it would eliminate unnecessary OREF support at run-time. Some of them replied that it would be microseconds, so what is the reason to bother.

Is it possible to estimate the impact of OREF support of method calls at run-time? E.g., as a % of all CPU load. 

12
0 568
Question Santhosh Gladson · Sep 20, 2018

Hello Experts,

I have a silly question of using InsertParam method and usage. I understand it is name value pair. I am using GET method to send a url and to get the details from server. URL has multiparameter

URL -  api/Identifier/Image/?Verify.EDD={EDD}&Verify.Ethnicity={ETHNICITY}

I have used the URL in a method and called that method directly in the business operation. I am using Insertparam method -

do httpRequest.InsertParam("EDD",..Data.Verify.EDD)
do httpRequest.InsertParam("ETHNICITY",..Data.Verify.Ethnicity)

where httpRequest is an object of %Net.HttpRequest class

1
0 581
Question Stephen Wilson · Sep 19, 2018
404 Not Found

{
"error": {
 "errors": [
  {
   "domain": "global",
   "reason": "notFound",
   "message": "Not Found"
  }
 ],
 "code": 404,
 "message": "Not Found"
 }
}

I want to do something like the above sample from a Google Storage JSON API. I have a call to Write obj.%ToJSON() followed by return ..ReportHttpStatusCode(..#HTTP404NOTFOUND) however the HTTP Status code is always 200.  If I remove the Write obj.%ToJSON() statement it returns a 404 status with no body. How do I return both?

1
0 2770
Question Scott Roth · Sep 13, 2018

We have the need to write a function that can loop through say a field in an OBX segment within HL7 and compare it to a string passed. Is it possible to have the user enter the Operator ( >,<,=,<>) as a variable inside Cache object script? Does anyone have any examples they can share?

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

8
0 617
Question Token Ibragimov · Sep 6, 2018

Hello!

I'm sending http resuest to the web service :

Set httpRequest=##class(%Net.HttpRequest).%New()
Set httpRequest.Server="177.127.120.10"
Set httpRequest.ContentType="text/xml" 
Set httpRequest.Https=1
Set httpRequest.ContentCharset="UTF-8"
Do httpRequest.SetHeader("Accept","text/xml")
Set httpRequest.Timeout=300     

Set xml="<CheckContractRequest><IIN>"_IINPay_"</IIN>"
_"<FirstName>"_name_"</FirstName>"
_"<LastName>"_surname_"</LastName>"
_"<MiddleName>"_middlename_"</MiddleName>"
_"<BirthDate>"_birthDate_"</BirthDate>"
_"<ContractType>CONST</ContractType></CheckContractRequest>"

13
0 1337
Question Stephen Wilson · Sep 14, 2018

So by queryString I mean name-value pairs passed  in as part of the URL. Currently my service works when called like this
http://{{SERVER}}:{{PORT}}/bsolabs/api/codemanagement/testcode/BIO/CRP

What would I need to change so I can call it like this?
http://{{SERVER}}:{{PORT}}/bsolabs/api/codemanagement/testcode?Discipline=BIO&TestCode=CRP

2
0 726
Question sween · Sep 6, 2018

Hello,

Looking for some help on how I actually set the properties to enable tracing for %Net.SSH.Session ?

The doc is here:

https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls…

The values look bitwise in their defaultness and I cant seem to figure out how to enable it in my object (or if I am going about this wrong altogether).  I am troubleshooting an elusive ssh error: unable to exchange encryption keys in a catch at the moment.

Would appreciate a clue if anybody has experience with it... thank you.

-Ron

3
0 505
Question Vivek Ranjan · Aug 31, 2018

The same piece of data never throws this error on other operations. I am getting this error on one always .

The same SDA container never throws error on other operation.

ERROR #6901: XSLT XML Transformer Error: SAXParseException: invalid character 0x1C (Occurred in an unknown entity)


Set xslt=##class(%Dictionary.XDataDefinition).%OpenId(..%ClassName(1)_"||Xmethod",-1,.tStatus)
$$$ThrowOnError(tStatus)
Set tStatus= ##class(%XML.XSLT.Transformer).TransformStream(myStream,xslt.Data,.OpStream)
$$$ThrowOnError(tStatus)

XData Xmethod
{

1
0 1283
Question Token Ibragimov · Aug 14, 2018

Hello,

while sending JSON request :

Set Object = ##class(%ZEN.proxyObject).%New()
Set Object.iin="123132132"
Set Object.firstName=name
Set Object.lastName=surname
Set Object.middleName=middlename
Set Object.birthDate=birthDate
Set Object.contractType="Z001"

set sc = ##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON(Object)

Set sc = ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(httpRequest.EntityBody, Object)

Set sc = httpRequest.Post("", 2)

receive error bellow:

"Corrupt body: json: cannot unmarshal number into Go struct field CheckContractRequest.iin of type string". 

18
0 1646
Question Hieu Dien Nguyen · Aug 23, 2018

Hello Everyone,

I have a healthshare web application with production, I try to make a field in basic setting of business service, and I would like to set a string to DISPLAYLIST and VALUELIST of that Property (string maked by query to sql table). I code the same here but it's syntax incorrect in DISPLAYLIST = GetTypeDisplay(), VALUELIST = GetTypeValue(). Someone know a best way to solved my problem? Thanks so much!

8
0 1720
Question Jack Huser · Aug 22, 2018

Hello Everyone,

I was wondering about the best way to initialize several variables, or several lists of variables.

Would it be better to write it like:

set (var1, var2, var3) = "value1"
set (var4, var5) = "value2"
set (var6,var7,var8) = "value3"

or

set var1="value1", var2="value1", var3="value1", var4="value2", var5="value2", var6="value3", var7="value3", var8="value3"

or

set var1 = "value1"
set var2 = "value1"
set var3 = "value1"
set var4 = "value2"
set var5 = "value2"
set var6 = "value3"
set var7 = "value3"
set var8 = "value3"

When comparing the speed of each methods:

6
0 588
Question Seth Jaffe · Aug 15, 2018

We are running old VB code on a Windows 2012 R2 server.

In the last month the following error has been happening.

      Failure to create CacheObjectConnection.
      Failure in GetClassInfo for CacheObjectConnection

      Factory not connected to server
     Send to Cache' failed

Neither the the code or Cache instance has not changed.

Cache 2017.1.1.111.0

The code:

7
0 1053
Article Alessandro Marin · Aug 14, 2018 5m read

The source class of a DeepSee cube has a property referencing a different class:

Class ClassA Extends %Persistent {
     Property P1 As ClassB;
}

When records in class B change, the ^OBJ.DSTIME global for Class A will not be automatically updated. This means that synchronization of cubes based on source class A will not reflect the changes occurred to property P1.
This post will help you determine the best way to achieve synchronization of properties referencing a different class

2
2 546
Question Alexandr Ladoshkin · Aug 3, 2018

Hello there,

I have some problem with inserting date to table using dynamic sql.

I have Country class. This table has relationship with class Continent as parent and child. In addition I have another statistic class where property Country has type of Country class. I get ID such as "1||1" next I execute dynamic sql INSERT INTO Stats(Country) VALUES("_CountryId_"). Then I select Stats table and see that value of Country column is "11") As a result a can't get Country object.

Please advice solution of this problem

Thank you

2
0 431
Question Mark Anthony Manalo · Aug 2, 2018

Hello everyone,

Im just wondering if there is any possibility to "Listen" to a cache DB? We have our cache DB somewhere else provided by a different company, we are provided the interface to connect to that cache DB so we can extract the cache DB every night.

Im just curious if theres a way to "listen" to the cache DB, so if theres any changes on the table in the cache DB, I could make a trigger to extract the table again.

I know i could just set my ETL every hour or so... but that would extract all the tables in cache DB.

Thanks a lot for any help and information.

Kind regards,

mark

9
0 889
Question Jayvee Rato · Jul 31, 2018

Hi Guys,

I' am using Cache Object Binding for .NET, our Cache Version is Cache for Windows (x86-64) 2010.2 (Build 454U).

How can I set the connection for Cache List of Objects? Here is my sample code.

//CACHEObject as my file generated from OBJECT BINDING

CACHEObject.ContainerImco containerImco = new CACHEObject.ContainerImco(cacheConnection);
CacheListOfObjects<CACHEObject.ContainerImco> lcontainerImco = new CacheListOfObjects<CACHEObject.ContainerImco>();

//Already tried this one but fails

4
0 978
Question Scott Roth · Jun 29, 2018

I wrote a ZAUTHENTICATE.mac a couple of months back, and found recently that it is creating coredumps on almost a nightly basis. I think I have figured out this problem to be not clearing out my MsgSearch after I am doing 2 of them within the code.

1. Get User Attibutes from AD

2. Get User Groups From AD

So while I am trying to cleanup the code I thought it would be a good time to add a Certificate and TLS to the mix since I should of been using that all along. However I keep running into issues

Error message: Cache error: <UNDEFINED>ZAUTHENTICATE+104^ZAUTHENTICATE *LD

14
0 586
Article Athanassios Hatzis · Jul 23, 2018 5m read

Hi,

this is a public announcement for the first release of Intersystems Cache Object-Relational Mapper in Python 3. Project's main repository is located at Github (healiseu/IntersystemsCacheORM).

About the project

CacheORM module is an enhanced OOP porting of Intersystems Cache-Python binding. There are three classes implemented:

The intersys.pythonbind package is a Python C extension that provides Python application with transparent connectivity to the objects stored in the Caché database.

2
1 1233
Question Laura Cavanaugh · Jul 12, 2018

I have a class that has a property calledTags (like DescriptiveWords, but tags), where multiple tags are possible.  I am trying to decide on list of Objects vs. array of Objects.

Based on this post: https://community.intersystems.com/post/querying-list-property-sql, sounds like using an array of Objects is the better way to go. Indeed, I already noticed that it's not possible to have duplicates when using an array of Objects.

However, I am unable to make my queries on the array of Object use an index.  

4
0 944