Null value as a default value


Author
Message
Diu King,Tiong
Diu King,Tiong
StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)
Group: Forum Members
Posts: 43, Visits: 264
Hi Edhy,

let me give an example:

2 tables there are the purchase order and customer. In the purchase order table, there have customer link into it as a foreign key. I did set referential integrity for this relationship between purchase order and customer.

My problem is when i try to insert new record for purchase order and i didn't choose customer, suppose foreign key customer inside purchase order table is default to NULL. Strataframe framework do prompt me the message like "The insert statement conflicted with the foreign key constraints.........................."



Please advice 
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi dktiong,

This is handle by the framework via the Custom Field Property of the field in the Business Object.  In this form, look at the "NULL Value Option" and choose the one that fits your needs, in your case I think you may use the option of "Return Alternate on Null / Set Null on Alternate (Value Type)".

With the above option the BO field property will setup the value you defined when a Null is found and if it has not changed, then it will set NULL back.

Edhy Rijo

Diu King,Tiong
Diu King,Tiong
StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)
Group: Forum Members
Posts: 43, Visits: 264
Hi all,

Initially i set my foreign key's field's column properties's Default value or Binding to 0. After while i want back Null values to be saved and i remove 0 from Default value or Binding. However still default value 0 but not Null values saved.

Please advice...
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