-
-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Querying Vogen value types throws exception #3450
Comments
@rena0157 I think you need to use a where clause, i'm not sure the FirstOrDefault method is directly supported. Please try a where clause containing your predicate followed by FirstOrDefault: A new LoadAsync overload was created by Jeremy to unwrap the id when building a query against the primary key. Similar work needs to be done for all linq overloads to take care of the translation of the linq expression tree for arbitrary queries, and there are plenty of method overloads to handle. This work isn't fun, and if I remember correctly not all cases are covered yet. However from my experience, PR's are welcome. As an aside, I started working on something similar to query against Fsharp Discriminated unions here, but since I use F#, i decided to use unit of measures through the UMX library instead since they are compile-time abstractions resolving to the raw base type at runtime, much less hassle. I left the github issue open in case I find a compelling business case to further implement DU support. |
@nkosi23 Marten supports using the logical Where() clause in any kind of First/Single/OrDefault operator. |
The existing value type support was assuming that the value types would be |
Okay, so this was a couple different things:
|
When using the new value type integration in Marten an exception is thrown when trying to query the value.
Reproduction can be seen here
The text was updated successfully, but these errors were encountered: