You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.
should be enough for converting to and from database values for a specific type. With session.Insert() it works as expected.
However, when using custom queries with arguments, only DbType mappings are considered.
I'm currently using a little helper to do the conversion for me.
Don't know enough about the workings of session.Insert and how that would effect that. It could also break code that relies on the current behavior...
Noticed another thing though, session.Fetch<MyType>(sql) where the SQL is simply SELECT * FROM MyTable also throws NotSupportedException unless a DbType mapping is registered in addition to the converter, which I don't think is intended?
OK, well since you have a working solution I'll just leave this to be thought about as part of version 7 instead of trying to update 6.2.
As far as the NotSupportedException goes, can you raise that as a separate issue with enough of a code sample to repro in an empty console app? (e.g. just the class definition for MyType, the mapping configuration and the sample call to session.Fetch?
According to the wiki page on Type Converters, registering a converter via
should be enough for converting to and from database values for a specific type. With
session.Insert()
it works as expected.However, when using custom queries with arguments, only DbType mappings are considered.
I'm currently using a little helper to do the conversion for me.
This works fine, however this might be a more common problem then just for me, so something like this could be supported by ML itself.
The text was updated successfully, but these errors were encountered: