This question is locked. New answers and comments are not allowed.
Hi.
I use artifical API for mapping nullable field.
But Member with name "Age" in PersistentType did not generated Nullable Property.
And when I'm trying to update field which contain "null" value
I'm getting exception
Row not found: GenericOID@8ab3a1bd Kassa id=52\nUPDATE [Kassa] SET [net]=? WHERE [id] = ? AND [net]=?\n(set event logging to all to see parameter values).
In sql profiller we see
Why when using artifical Api property of CLR Type doesn't generated with nullable?
Thanks.
I use artifical API for mapping nullable field.
prop = tableMappingConfig.HasArtificialPrimitiveProperty(
"Age"
,
typeof
(
int
));
prop.IsNullable();
And when I'm trying to update field which contain "null" value
SELECT
[id], net
FROM
[dbo].[Kassa]
WHERE
id = 52
result:
id net
----------- -----------
52 NULL
Row not found: GenericOID@8ab3a1bd Kassa id=52\nUPDATE [Kassa] SET [net]=? WHERE [id] = ? AND [net]=?\n(set event logging to all to see parameter values).
In sql profiller we see
declare
@p1
int
set
@p1=2
exec
sp_prepexec @p1
output
,N
'@p0 int,@p1 int,@p2 int'
,N
'UPDATE [Kassa] SET [net]=@p0 WHERE [id] = @p1 AND [net]=@p2'
,@p0=1,@p1=52,@p2=0
select
@p1
Why when using artifical Api property of CLR Type doesn't generated with nullable?
Thanks.