csla: AmbiguousMatchException DataPortal.Fetch
Describe the bug Upgrading to 5.4.1 has a breaking change. Can’t have a DataPortal Interface method parameter without decorating method with [Fetch] attribute.
private void DataPortal_Fetch(ICriteriaBase criteria)
private void DataPortal_Fetch(IEnumerable<string> criteria)
Also happens using the new modifier on DataPortal_Execute. protected new async Task DataPortal_Execute
Version and Platform CSLA version: 5.4.1 OS: Windows, Linux, iOS, Android, etc. Platform: WinForms, WPF, ASP.NET Core, MVC, Xamarin, etc.
Code that Fails Sample app runs fine using 5.4.0. You will need to update csla to 5.4.1 to cause the error in the sample app. https://github.com/coder-rr/CslaDpTest
Stack Trace or Exception Detail Exception Message
CslaDpTest.CarList.[Fetch](String[]). Matches:
CslaDpTest.CarList[Void DataPortal_Fetch(System.Collections.Generic.IEnumerable`1[System.String])],
Csla.ReadOnlyListBase`2[[CslaDpTest.CarList, CslaDpTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],
[CslaDpTest.CarInfo, CslaDpTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]][Void DataPortal_Fetch(System.Object)]
Stack Trace
at Csla.Reflection.ServiceProviderMethodCaller.FindDataPortalMethod[T](Type targetType, Object[] criteria, Boolean throwOnError)
at Csla.Server.DataPortal.<Fetch>d__11.MoveNext()
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (10 by maintainers)
Commits related to this issue
- #2109 Add fetch overload tests — committed to rockfordlhotka/csla by rockfordlhotka 3 years ago
- #2109 Add tests for fetch method overloads — committed to rockfordlhotka/csla by rockfordlhotka 3 years ago
- #2109 Update test to reflect comment in issue thread — committed to rockfordlhotka/csla by rockfordlhotka 3 years ago
- #2109 Make object type the lowest priority match — committed to rockfordlhotka/csla by rockfordlhotka 3 years ago
- #2109 Make object type the lowest priority match — committed to rockfordlhotka/csla by rockfordlhotka 3 years ago
Regardless, this was a bug that needed fixing, and I’m glad you brought it up and helped figure it out! Thank you.
Thanks for looking into this. Our next application release will contain refactored business objects to include the data portal operation attribute.
On Mon, Apr 5, 2021 at 1:30 PM Rockford Lhotka @.***> wrote:
It has been fixed in Main, but it is broken in 5.4.1