Added sql method to AppModel