Fix unioning more than 1 query
Fix resource path.
Set the app key in the config after updating it
Merge pull request #2572 from GrahamCampbell/4.0

Set the app key in the config after updating it
Check null.
Merge pull request #2559 from maddhatter/fix-multi-unions

[4.0] Fix unioning more than 1 query
Add support for order by and limit on MySQL update queries.
Cast wheres to array.
Added getRepository method to password broker.
Correct behavior of hasFile on arrays of files.