Robert Cemper · Nov 24, 2022 go to post

Add this line to your test:

Set object = ##class(dado.TblTeste).idxFieldOneFieldTwoFieldThreeOpen(1, 2, "")
If 'object Do $system.OBJ.DisplayError()

So you see the reason for failing

Open by unique index reqires an EXACT match

Robert Cemper · Nov 16, 2022 go to post

Once you have your own children you would learn that there is no need to TEACH interest.
If your children accept you they follow your path. anything else is just academic nonsense.

So proven by my 3 highly adult and successful children and 4 grandchildren following the traces.

Robert Cemper · Nov 12, 2022 go to post

my review on OEX now shows also if the package supports IPM
all 19 reviews have been updated

Robert Cemper · Nov 9, 2022 go to post

To achieve the expected result of individual storage you may take this approach:

Class Test.NewClass Extends %Persistent [ NoExtent ]
{
Property Name As %String [ Required ];
Index NameIndex On Name [ Unique ];
}

and
 

Class Test.NewClass1 Extends Test.NewClass
{
Storage Default
{
<Data name="NewClass1DefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>Name</Value>
</Value>
</Data>
<DataLocation>^Test.NewClass1D</DataLocation>
<DefaultData>NewClass1DefaultData</DefaultData>
<IdLocation>^Test.NewClass1D</IdLocation>
<IndexLocation>^Test.NewClass1I</IndexLocation>
<StreamLocation>^Test.NewClass1S</StreamLocation>
<Type>%Library.CacheStorage</Type>
}

}

and you see:
ERROR #5808: Key not unique: Test.NewClass1:NameIndex:^Test.NewClass1I("NameIndex"," A1")

Robert Cemper · Nov 9, 2022 go to post

no big surprise.
if IDKEY <> PrimaryKey then PrimaryKey is just a UNIQUE Key on some property.

I expected it as on object side you have %OpenId()  but no %OpenPrimary() or similar.
only Classmethod  <uniqueProperty>KeyOpen(...)

Robert Cemper · Nov 7, 2022 go to post

there is a quite wide selection of licenses.
the best for details is to contact your local sales rep from InterSystems to find your optimal solution

Robert Cemper · Nov 3, 2022 go to post

Following this discussion since beginning I'm wondering about the variant I've learned.
my personal approach would be.
#1)
have an exact copy of your class also pointing to the same storage
remove all index definitions from that clone class
run your bulkload
#2)
if you don't want to have the same storage
just eliminate the index definitions in the copy
clean its storage and run your bulk load
finally, merge the resulting globals

#' .)
It's not pure OO,
but writing to storage is never OO with Caché or IRIS 

Robert Cemper · Oct 28, 2022 go to post

GREAT!
Looks like embedded Py starts to understand how IRIS really works inside !!!!  yes  

Robert Cemper · Oct 27, 2022 go to post

I'd say it's a bug in Query Generator.
A workaround in DB-API just might hide the real cause. 
If you are lucky the bug is fixed by the next release or the next after or some future release

Robert Cemper · Oct 27, 2022 go to post

thanks for confirming my diagnose
- that's why I used "+id as id1" to break the link to index global
- and :BTW:   ORDER BY 1  ; just using column position shows the same bug

Robert Cemper · Oct 26, 2022 go to post
set claim=##class(Claim).%OpenId(claimnum)  ; or similar
set line=##class(ClaimLine).%OpenId(linenum) ; or similar
do claim.ClaimLineRel.Insert(line)

now your query should work

Robert Cemper · Oct 25, 2022 go to post

Why would you want to do this?
the index related to %Save() is no "build" but just setting a value to the index global. 
setting an index is mostly less load than saving an object.

Robert Cemper · Oct 23, 2022 go to post

A possible workaround 

SAMPLES>set rs= ##class(%SQL.Statement).%ExecDirect(,"SELECT +id id1, x, y, z FROM some_table ORDER BY id")

SAMPLES>while rs.%Next() { zwrite $listbuild(rs.id1, rs.x, rs.y, rs.z) }
$lb(1,1,2,"z1")
$lb(2,2,3,"z2")
$lb(3,3,4,"z3")
$lb(4,4,5,"z4")

SAMPLES>

The point is to consume your value NOT from temp order global.

tested in 
Cache for Windows (x86-64) 2018.1.7 (Build 721U) Fri Mar 18 2022 22:07:35 EDT
Should also work in IRIS

Robert Cemper · Oct 15, 2022 go to post

and code quality will struggle with it and dislike it

because you use name in write, but you don't set it explicitly

but don't care much about:
it doesn't understand %-variables and global variable scopes
and $$$macros with code inside, and ... and ... and  

Robert Cemper · Oct 14, 2022 go to post

to get control over your situation you have 2 key methods:

  • $SYSTEM.License.MaxConnections() returns the maximum number of connections a user can make while consuming one license unit.
  • $SYSTEM.License.ConnectionCount() returns the number of connections currently associated with the given UserIdentifier. The range of return values is normally 0 through MAXCONNECTIONS. If the value exceeds MAXCONNECTIONS then more than the allowable number of concurrent connections were attempted for a given ID and the system has transitioned to a mode of one connection per license for this UserIdentifier.

So you have to check if your user has exhausted its available connections and block him.
It's anyhow quite interesting how these users are able to trigger so many connections.

Robert Cemper · Oct 14, 2022 go to post

This is intentional behavior.
If the routine you changed calls some subroutine it is kept "on the stack"
This is a requirement to have a save return and continuation after the call.

The new version only becomes active after you have left the previous one by QUIT or RETURN.
simpler: if it is gone from the return path. 

Robert Cemper · Oct 13, 2022 go to post

I share your suggestion!

When I started with Docker I was highly skeptical after many years with VMware starting before their first release.
It was a hard exercise and I took quite a while digging through docs and helps.
My main problem was that everything was so generic and not at all specific to IRIS (or Caché).

Meanwhile, it became so common to me that I stopped running reviews on packages without docker.
Docker allowed me to have a "clean desk" after testing.
In addition. I saw through this activity so many valid variations that
I doubt to decide how to start and where.
On the other hand, I see in OEX ~450 tested and working examples (a dozen PR still pending) 
Following these examples and trying to understand what will be achieved
could be good food for training designers. 
 

Robert Cemper · Oct 11, 2022 go to post

You may have only 1 command: in each build
the 2nd overwrites the first

  iris:
    image: intersystemsdc/iris-community:latest
    command: --check-caps false
    container_name: tls-ssl-iris
    networks:
      app_net:
        ipv4_address: 172.16.238.20
    volumes:
      - ./iris-config-files:/opt/config-files
      # Mount certificates files.
      - ./certificates/CA_Server.cer:/usr/irissys/mgr/CA_Server.cer
      - ./certificates/iris_server.cer:/usr/irissys/mgr/iris_server.cer
      - ./certificates/iris_server.key:/usr/irissys/mgr/iris_server.key
    hostname: iris
    # Load the IRIS configuration file ./iris-config-files/iris-config.json
    command: ["-a","sh /opt/config-files/configureIris.sh"] 

this worked as multi-line 

command: 
    - -a
    - sh /opt/config-files/configureIris.sh 
      - --check-caps false

BUT  
         command: ["-a","sh /opt/config-files/configureIris.sh","--check-caps false"]

works as well