wakanda

Case sensitive query in Wakanda db


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.


Solution

  • 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.