Tip when creating case sensitive structure keys in ColdFusion
mappings = structnew();
mappings.FirstName = "Luis";
mappings.LastName = "Majano";
You would say that the keys for this structure would be "FirstName" and "LastName" would you? Well, the answer is NO!! The keys would be "FIRSTNAME" and "LASTNAME" because the are uppercased by CF. If you really want to keep case, then don't use dot notation but array notation:
mappings = structnew();
mappings["FirstName"] = "Luis";
mappings["LastName"] = "Majano";
By using array notation you are explicitly setting the key with the correct case. I re-discovered this gem by yes, UNIT TESTING, the ColdBox caching engine and some tests where failing because the keys could not be found. Well, DUUHHHH!!! You where assigning them wrong. Anyways, I thought I would share my stupidity on the matter and hopefully save someone or even myself in the future, the few minutes of "WHY WHY WHY!!"