Replies: 6 comments
-
I don't believe it's being picked up in selects either. If you look in the |
Beta Was this translation helpful? Give feedback.
-
You are right. I just realized i am going through a custom sql that i generate and go through Dapper directly instead of going through FastCrud, to select the data from this table. What do you recommend i use here to get sql_variant to work properly? I can always override the IsSimpleSqlType to allow objects. That could have other side effects though. |
Beta Was this translation helpful? Give feedback.
-
I'd override Whatever the case, just get it in there. I'm very curious to hear what happens when a generic object is being used as a property type 😉 |
Beta Was this translation helpful? Give feedback.
-
Ended up overriding GetEntityProperties. Added a required attribute to FIELD_VALUE. And forced the required properties to be added regardless if they meet the IsSimpleSqlType criteria or not. Legacy column i have to support. Will let you know if it works alright, as i think previously L2S was handling converting sql_variant to object. Not sure what will end up happening here. |
Beta Was this translation helpful? Give feedback.
-
What's the general understanding of that |
Beta Was this translation helpful? Give feedback.
-
Not sure what ORM's do in general - but in my case i am using it to force it into the queries. |
Beta Was this translation helpful? Give feedback.
-
I have a property
public object FIELD_VALUE { get; set; }
which maps to a DB column FIELD_NAME which is of type sql_variant not null.
That column gets ignored when the insert or update statement is generated.
Works fine in select statements.
Beta Was this translation helpful? Give feedback.
All reactions