I have an Entity-Attribute-Value (EAV) database. An entity in this sense has nothing to do with objects in EF, but simply refers to some โthingโ about which you store information. You save the value in the value table, which is associated with the Attribute (information name) and Entity.
In the EAV model, you do not store NULL values. For this combination {Entity, Attribute}, the absence of entries in the table of values โโmeans NULL.
Because of this, the data column (say, type Int) in the value table is not null. This is the limitation I have to deal with. I canโt change it.
I am creating a WPF application and want the Value object to be bound to a text field. If the text field is empty when saving, I need to make sure that the related object is not included in the save (because it will write 0 to the table, which is incorrect). If the text field is not empty, obviously, the data should be saved.
I experimented with detaching and reinstalling an object based on the value of a text field, but I get errors related to relationship objects.
Any ideas on how I can achieve what I'm trying to do?
tnewell
source
share