Using Handcrafted SQL in Non-Standard Entity Operations