Hi Martin,
2) The Unique key for table1 is [Name (string) and Number (RecId) what do you mean by natural key? does it mean "what's the unique key that is not a RecId", if yes, then it's the Name field. but the name alone is not unique in the table. So does that mean the Name alone from table1 should be one of the entity keys?
3) Regarding "If you want to import data to Table1RecId (which I don't know), then you must have an entity field identifying Table1. But I can't say whether it must be in the entity key or not - it depends on your requirements."
I want to Import to Table 2 and Table3. However, Table1 should be in the entity, so that we know that records from table2 and table3 belongs to a record in table1.
That's why I asked, that in this case, Table1 should be read only because I'm not going to insert anything to it, but i need it look them together -- based on what i understood from you
And Table2 and Table3 ReadOnly property should be set to No because i need to import to them
but how can I pass values of table1 without actually making the user fill them?
This is more info about the table (unique keys of the table, data types of the fields, relation between tables)
Table1 (Name and Number unique)
Name(string) Number(int64) Table1RecId(RecId)
A A1 1
B B2 2
A A3 3
Table2 (Field1 unique)
(relation with table1 is recId -- Table2.Table1RecId = Table1.RecId)
Table1 - Table2 -- one to many
Field1(string) Table1RecId(RecId) Table2RecId(RecId)
F1 1 1
F2 1 2
F3 2 3
Table3 (Table2RecId and FieldX and FieldY unique)
(relation with table2 is recId -- Table3.Table2RecId = Table2RecId)
Table2 - Table3 is one to many
Table2RecId(RecId) FieldX(String) FieldY(String)
1 x y
1 x z
2 y z
3) I just need to understand how to specify Entity key when importing. I think your reply for point 1 will help me.
3a. If table1 is read only, then does that mean that it doesn't need to be in the entity key?
3b.shall the entity key only be from table2 and table3 because they are used for import?
3c. When importing, the entity key shouldn't contain RecId?
3d. based on the additional info -- what do you think they entity key should be in this case?