Hello Frans,
This is not really a problem with LLBL I guess. Below our structure:
Contact
- CNT_I_ID (PK)
- CNT_D_CREATE
- CNT_I_TYPE
Person
- CNT_I_ID (PK)
- CNT_I_TYPE (<-- This is the duplicate fields. In fact, most of the fields from contact are also present in Person)
- PER_S_FIRSTNAME
Table Person inherits from table contact. As you can see the Field CNT_I_TYPE is both in the two table and also have the same name.
Now, when we do the following code:
Person person = new Person();
person.CNT_I_TYPE = 2;
person.PER_S_FIRSTNAME = "John";
person.Save() //pseudo code, as we are using adapter
LLBL will generate the following 2 SQL insert:
- one for Contact
- then one for person
as CNT_I_TYPE is in both table, it will only appears in the second SQL statement, making the first call failed as this is a mandatory field.
By now, we have renamed the fields names in the Person entity, but I hope that you might have a better idea...(btw, this is only an example, as our Contact table has almost 30 fields, which are all replicated in Person - ok, I know, bad design...).
Cheers,
Silat.