1

I am working with an external system that uses case sensitive keys. To simplify, lets say ID 'a1' and 'A1' represent two different entities. I need to find the entity by external ID but query and find methods are not case sensitive in Wakanda so it finds both (or possibly wrong) entities when I query/find. Any Ideas?

ds[dataClassName].query("externalID == :1","a1");

I want to find one (correct) entity not two as this code does.

ScottE
  • 31
  • 6

3 Answers3

1

Unfortunately in the current implementation of Wakanda, queries are NOT case sensitive.

Fred

0

I found that the indexOf() method is case sensitive and I have an auto sequenced ID and external ID for each prospect so the following will find the correct entity. Probably very inefficient. Any improvements?

var x = ds.Prospect.query('externalID == a1');
var i = x.externalID.indexOf('A1');
x[i];
ScottE
  • 31
  • 6
0

You could create a sensitiveQuery() dataclass method that does a query() inside and then filter the query result with an indexOf and returns the correct entity. A ds.Prospect.sensitiveQuery() would do the trick.

Yann
  • 478
  • 5
  • 10