Model query getconnection