query:SELECT id, username FROM cms_users WHERE username = ?
fetchAllColumns:
name:fetchAllColumns
resultClass:CmsUser
query:SELECT * FROM cms_users WHERE username = ?
fetchJoinedAddress:
name:fetchJoinedAddress
resultSetMapping:mappingJoinedAddress
query:SELECT u.id, u.name, u.status, a.id AS a_id, a.country, a.zip, a.city FROM cms_users u INNER JOIN cms_addresses a ON u.id = a.user_id WHERE u.username = ?
fetchJoinedPhonenumber:
name:fetchJoinedPhonenumber
resultSetMapping:mappingJoinedPhonenumber
query:SELECT id, name, status, phonenumber AS number FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username = ?
fetchUserPhonenumberCount:
name:fetchUserPhonenumberCount
resultSetMapping:mappingUserPhonenumberCount
query:SELECT id, name, status, COUNT(phonenumber) AS numphones FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username IN (?) GROUP BY id, name, status, username ORDER BY username
query:SELECT u.id AS u_id, u.name AS u_name, u.status AS u_status, a.id AS a_id, a.zip AS a_zip, a.country AS a_country, COUNT(p.phonenumber) AS numphones FROM cms_users u INNER JOIN cms_addresses a ON u.id = a.user_id INNER JOIN cms_phonenumbers p ON u.id = p.user_id GROUP BY u.id, u.name, u.status, u.username, a.id, a.zip, a.country ORDER BY u.username