mat icon indicating copy to clipboard operation
mat copied to clipboard

Add a query to select references by field for a set of objects

Open kgibm opened this issue 6 months ago • 0 comments
trafficstars

I had a use case where a Hashtable had over 100K instances of class X, each instance of class X had a reference path down a few levels (let's call it A.B.C), and I wanted to send all of the instances of C into another query. I couldn't copy the 100K instances of X into an OQL query because the copy to OQL limit is 10,000. I couldn't use the Java Basics } OQL query to select the fields because the OQL query limit is 1,000. In principle, Group by Value could work, but in this case the instance of C have no String value to evaluate (I need them as objects to then pass to the final query). I could create a full custom query for my use case but I thought one solution to this would be to create a new "Select Objects by Field" query which allows you to simply provide a field selector for a context and then that simply calls resolveValue on each object in the context for that field selector.

kgibm avatar Apr 22 '25 11:04 kgibm