specs and code for user orm queries