#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 Vivek Ranjan · Apr 13, 2018

I am trying to created SOAP request body that I need to post as string. I created the SOAP client and tried with this to get SOAP envelope. Can you suggest a way for this.

Set proxy=##Class(Client.Class.Client.Methodname).%New("Methodname")
Set proxy.Para1="a"
Set proxy.Para2="b"
Set tClient=##Class(Client.Class.Client).%New()
Do tClient.WriteHTTPContent(proxy,proxy.%RequestName,0,0,"","",.stream)

14
0 1826
Question Scott Roth · Apr 6, 2018

Is there a way to make the system users like _SYSTEM and ensadm bypass the Delegated sign-on and not cause it to fill up the Audit trail with "Programmer mode login failure"?? I figured I still had to leave password login enabled for the background users to run. How would I script if username = "_SYSTEM" then don't do the Delegated sign on?

Here is my ZAUTHENTICATE

3
0 422
Question Thomas Noitz · Apr 3, 2018

Hi guys,

is there an easy way to compare two objects in os?

Example:

I have a registered order-object at runtime. Now I want to call a specific export-service just in the case that sth in this order has changed since the last export. So I have to compare the persisted order-object (last export) with the current order-object.

Ist there an easy way to compare these two objects or do I have to check each object-value separately?

Thanks for your help!

Regards, Thomas

1
0 953
Question Ben Spead · Mar 23, 2018

I've been writing ObjectScript for a long time and was a little surprised by this behavior so I'd like to understand what is going on.

I was doing a peer review on some source which had roughly the equivalent of the following line:

Set myRecord = ##class(MyObj.Record).%OpenId(id)
Set emailList = previousEmails_","_myRecord.RecordGroup.EmailList

I flagged it for further testing because the code didn't check if RecordGroup was set and I knew that not all records were part of a Group so I was expecting that in cases where it wasn't set this line should throw an <INVALID OREF>

2
0 378
Question Mack Altman · Feb 16, 2018

I came across How to import a tab separated text file into a SQL table programmatically?, which appears to indicate that I can pass the filename and all records will be imported. However, when I put use the Import method only a single record gets imported. However, all records are imported if I use the management console to import the file by selecting it and choosing the options.

Has anyone ran into this in the past?

3
0 749
Question Ali Chaib · Mar 5, 2018

Hi,

I'm trying to send a txt file over TCP.

The txt file contains lines, every line has a fixed length : 179 characters , however it seems that this length vary while sending it!

So, I need to send the content of the txt file as it is without adding anything.

I'm using as operation EnsLib.TCP.PassthroughOperation.

 I need your help please.

Thanks !

3
0 540
Question CJ H · Mar 2, 2018

$zt

Can anyone guide me where is the documentation for $zt?

The google seems suggest it may be "$ztime" or "$ztrap".

Thanks.

3
0 702
Question Kishan Ravindran · Oct 12, 2017
Set httprequest=##class(%Net.HttpRequest).%New()
	Set httprequest.Server="www.intersystems.com"
	Do httprequest.Get("/")
	Do httprequest.HttpResponse.OutputToDevice()
	Do httprequest.Get("/cache/")
	Do httprequest.HttpResponse.OutputToDevice()

The above is the code which i found in this link http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?… 
How do the above code works and can i be able to run this?

Thanks in advance.

5
0 3532
Question D Sun · Mar 1, 2018

 I  keep seeing  <INVALID OREF>zMypropertyGetSwizzled+3^myClass.2  in the error log.  In my case,  Myproperty   is a property of  myClass. And Myproperty points to the the object of other class in the system. This error happens to 2 properties in the same class, and they are both object properties. This error pops up occasionally, and make the debugging harder.

Anyone knows what the issues are?

TIA

14
0 544
Question Sarvan Ibishov · Jan 29, 2018

Hi. I am newby in Cache. My source code at below. I have problem in Relationship property. Could you please help?

/// Class Test.Book Extends %Persistent{Property Name As %String;Property Author As %String;Property ISBN As %String;Relationship Chapters As Test.Chapter [ Cardinality = children, Inverse = bookid ];}
Class Test.Chapter Extends %Persistent{Property Name As %String;Property Page As %Integer;Relationship bookid As Test.Book [ Cardinality = parent, Inverse = Chapters ];}

then in terminal I am running these commands:

8
0 355
Article Amir Samary · Oct 12, 2017 4m read

Hi!

It is often necessary to run some external command such as a python program or a shell script from inside Caché/Ensemble. There are three ways of doing this:

  • $ZF(-1) - Runs the command and waits for it to finish.  
  • $ZF(-2) - Runs the command and don't wait for it to finish.
  • Using CPIPE device - Runs the command and opens a device for you to read its output or (exclusive or here!) write to its input.
8
1 2702
Question Scott Roth · Feb 16, 2018

I am working on an ZAUTHENTICATE.mac to move us from local cache users to Delegated Authentication against LDAP. 

I have created a user role within my instance of Ensemble that matches the AD Group that I will be assigning everyone in my group to.  Is there a way to query the list of available Roles within Ensemble, and if one of my AD groups matches that role, set the role for that user?

How would I compare the AD Group against the Role listing?

Thanks

Scott

10
0 740
Question John Murray · Feb 13, 2018

Documentation here lists the kinds of members a class definition may contain. In summary:

  • Parameters
  • Methods
  • Properties
  • Class queries
  • XData blocks
  • Projections
  • (and some that are relevant only for persistent classes):
    • Storage definitions
    • Indices
    • Foreign keys
    • SQL triggers

Later in the same document, a section headed "Class Member Names" contains this warning:

So I'm interested to hear how other DC members handle this.

7
0 418
Question Scott Roth · Feb 12, 2018

I am working through trying to use ZAUTHENTICATE.mac and LDAP.mac to do Delegated sign on into Ensemble. In reading over the samples and the documentation, I am not clearly finding on how to set the Appropriate Role from the LDAP group I return. Can someone help explain this part to me? If I have a user sign on, and I return a "Group" from the Authentication, how do I get that to transform into the Role I need for Ensemble.

Thanks

Scott Roth

1
0 595
Question Arun Kumar · Feb 5, 2018

Hi Guys,

I would to know, I have a drop down list items in my applications. While, am clicking on the drop down bx, there are few numbers of listed items, while am doing mouse over action, I should display the entire text of selected item from that drop down list box, even am not selecting that item. I would like to know about the what is exact text it contains in Zen framework. 

If any lead would be appreciated. 

Thank you in advance. 

13
0 1299
Question Daniel Kutac · Feb 6, 2018

Is there an API that would list classes within a given package? I can't find any. I do have a workaround that uses class index, but this query lists all classes available in the namespace and I have to filter those I want. But this is just unnecessary overhead.

If anyone has spotted such API, please let me know.

TIA!

Dan

3
1 1307
Announcement Mike Kadow · Feb 4, 2018

A new book on Caché Objects and Atelier                     $25 at Amazon.com                                                                                               

TinyUrlhttps://tinyurl.com/y74jw49c

Coming on Kindle

There are many good MUMPS developers who want to learn Caché Objects but do not know how to start.

At the same time, InterSystems is pushing the envelope of technology with a new development platform

such as Atelier along with Eclipse.

It is my aim in this book to help those developers bridge the gap into Caché Objects at the same time learn

Atelier as well.

5
0 1329