Fixed query var propagation in scaffolds

Signed-off-by: Tom Wright <tom@inflatablecookie.com>
Fixed default user field definition ordering

Signed-off-by: Tom Wright <tom@inflatablecookie.com>
Allow for local server cross db queries

Signed-off-by: Tom Wright <tom@inflatablecookie.com>