Hi I'm (trying to) using the prefetch to get related records but on render I have the following message:
{"The multi-part identifier \"Mextra.dbo.IBPWorkPlan.IBPDiscipline_Id\" could not be bound."}
When examining the the exception I filtered the generated query and tried to run it in the QA, here it throws the exception:
The multi-part identifier "Mextra.dbo.IBPWorkPlan.IBPDiscipline_Id" could not be bound.
SELECT [Mextra].[dbo].[IBPWorkGoal].[IBPWorkGoalID] AS [IbpworkGoalId], [Mextra].[dbo].[IBPWorkGoal].[Description], [Mextra].[dbo].[IBPWorkGoal].[StartDate], [Mextra].[dbo].[IBPWorkGoal].[EndDate], [Mextra].[dbo].[IBPWorkGoal].[GasScore], [Mextra].[dbo].[IBPWorkGoal].[IBPMainGoal_Id] AS [IbpmainGoalId], [Mextra].[dbo].[IBPWorkGoal].[User_Id] AS [UserId] FROM [Mextra].[dbo].[IBPWorkGoal] WHERE ( ( [Mextra].[dbo].[IBPWorkGoal].[IBPMainGoal_Id] = @IbpmainGoalId1 AND [Mextra].[dbo].[IBPWorkGoal].[StartDate] >= @StartDate2 AND [Mextra].[dbo].[IBPWorkGoal].[EndDate] < @EndDate3 AND [Mextra].[dbo].[IBPWorkPlan].[IBPDiscipline_Id] IN (@IbpdisciplineId4)))
What I'm I doing wrong? The WorkPlan has a relations with the WorkGoal and each workGoal can have multiple workplans.
Any help appreciated. Thanks