NH-3222 - Auto-discover types if query requires so