Question Chris Bransden · Nov 17, 2021 zen dataCombo - setValue() not show correct displayValue Hi All, I'm having a strange issue where doing a .setValue on a ZEN datacombo is updating it with the value as-is, not the corresponding display value. Eg, if I connected it to query that returns two columns: ID,Name, and do a setValue(ID), I would expect the text in the datacombo to update showing Name. Instead it updates show ID, which I only want to use internally. #ZEN #InterSystems IRIS 0 2 0 203
Question Chris Bransden · Mar 11, 2021 Possible to merge two %ResultSet ? Hi! I have a complex SQL select query which I execute via %ResultSet. It also includes a UNION. The select statement within the union should only be done when an external parameter is set, and I'm not sure of way of doing that within SQL, other than something like SELECT FOO FROM BAR WHERE (some conditions) UNION SELECT FOO2 FROM BAR2 WHERE :doUnion = 1 AND (some conditions) ...this works, but I don't think it's particularly optimal as I believe it will still execute the second SELECT regardless of :doUnion. It's also sort of hard to read... #SQL #Caché 1 12 0 509
Question Chris Bransden · Jul 4, 2018 $ZF(-100,..) issues Hi, I found some issues with $ZF(-100) whilst replacing our old $ZF(-1) calls following the security alert. They're easy enough to work around, just figured it might be useful to someone :) #Caché 0 5 0 1.3K
Question Chris Bransden · Jul 25, 2017 How to automatically populate a transient array property? Hi! I am trying to automatically populate an array property of cash amounts keyed by currency ("GBP", "USD", etc). This property needs to be NOT stored on the database and visible via SQL and the cache object. Here's my attempt. Ultimately the array will be populated based on the the some child classes, but for now I'm just hardcoding it: #Object Data Model #Caché 0 4 0 711
Question Chris Bransden · Jun 28, 2017 Navigating through relationships via SqlComputeCode Hi!I have a global-mapped class that I want to add a transient property through (or at least, not stored on the database). This property is the sum total of various charge classes that are linked to the class via child relationships.I want this new transient property to be visible at least via SQL. #Object Data Model #SQL #Caché 1 4 0 598
Question Chris Bransden · Apr 19, 2017 Programmatically adding relationships to object instances Hi!I'm trying to insert a relationship from a parent object instance to a child object instnace programmatically. Ie, i want to do:Do parentObject.childRefProperty.Insert(chilDobject)where childRefProperty is defined by a string. I feel this should be achievable with $PROPERTY and/or $METHOD or maybe something in $SYSTEM.OBJ.*, but can't quite figure it out. Anyone know?Cheers :)Chris #Object Data Model #Caché 0 3 0 273
Question Chris Bransden · Sep 29, 2016 %WriteJSONFromObject retrieves too much of database when complex relationships are involved Hi all,We're creating a series of RESTful APIs that output data from a Cache database (made up of global storage that we've mapped to classes). I'm running into some problems with object-to-JSON conversions when relationships are involved. Eg:ParentClass has children relationship to ChildClassChildClass has parent relationship to ParentClass #JSON #Object Data Model #REST API #Caché 0 1 1 661
Question Chris Bransden · Jun 14, 2016 EclipseLink support I can see mention of it online - http://www.intersystems.com/our-products/cache/tech-guide/chapter-3/ - but nothing in the docs on how to implement. Does anyone have any experience with this? We've managed to implement Hibernate and JDBC connections to Cache DBs fine (these are documented!).Thanks very much :) #Caché 0 2 0 359