SQL Function to create Sencha Extjs and Touch Models from DB objs