Default value in field


Author
Message
Olivier
Olivier
StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)StrataFrame User (190 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 805
Hello,

I use a default value for all my field in sql Server with DDT , i don't want null value.

When i use this.MyBo.Add();  , i have a error when i save , cause Strata say me, cast is impossible on RUE_ID (my foreign key)
if after the add i instantiate with 0 or -1 , it's ok, without this it's doesn't work.

It's possible that Strata can instantiate with the default value when i use Add() method ?

thanks
Olivier,

==============================================
Asp.net C# - Strataframe - telerik
==============================================
Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Olivier,
You have to handle the nulls in the Business Object Mapper and set the Null Value Option to one that fix your need, in my case I mostly use "Return Altername on Null" and set the appropriate value for my integer FK fields to 0 and strings to String.Empty

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search