I just spent two hours with Steve Workings on the phone regarding my Dialog parent not working with child table repeating sections. My database is multi tenancy, so I have at least two columns that are primary keys in every table. For instance, in the employee table the primary keys are cid - for company id and empid - for employee id. The child address table then has three primary keys of cid, empid, and addrtypeid. Obviously, the child table links via cid, and empid. The combination of cid and empid in the employee table and combination of cid, empid, and addrtypeid in the address table are always unique. The backend database, PostgreSQL, is working because it will not allow an employee #3 from company #1 to be duplicated with another employee #3.
The problem is that binding tables does not work correctly with two or more primary keys between the parent and the child tables in the dialog. For instance, when inserting a new employee record, address information from another employee shows up in the repeating sections.
Steve's solution is to create a column in each table that is autoid and therefore unique. Tables are then linked with these autoid columns. When this is done, the repeating sections work. This seems to me to smack of Y2k type problems that will someday run out of room, not to mention, shouldn't be needed in the first place.
My question is, why does Alpha 5 specifically say "Primary key field(s)" in the bind to table section. This seems to imply that my way of multiple columns to create a unique primary key should work. But, as Steve points out, mine doesn't work, but his way does. Theoretically, I am right, but practically, I am wrong and Steve is right(as is often the case when I work with him)
Steve said, "Put it out on the forum and see what other people say." Done
The problem is that binding tables does not work correctly with two or more primary keys between the parent and the child tables in the dialog. For instance, when inserting a new employee record, address information from another employee shows up in the repeating sections.
Steve's solution is to create a column in each table that is autoid and therefore unique. Tables are then linked with these autoid columns. When this is done, the repeating sections work. This seems to me to smack of Y2k type problems that will someday run out of room, not to mention, shouldn't be needed in the first place.
My question is, why does Alpha 5 specifically say "Primary key field(s)" in the bind to table section. This seems to imply that my way of multiple columns to create a unique primary key should work. But, as Steve points out, mine doesn't work, but his way does. Theoretically, I am right, but practically, I am wrong and Steve is right(as is often the case when I work with him)
Steve said, "Put it out on the forum and see what other people say." Done
Comment