Move to optional SQL for joins. Use forward for returned XML