Fixed manyToOne correlation query convertion

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