Subject | Re: [IBO] Transaction with master-child relationship |
---|---|
Author | Alfred Seetoh |
Post date | 2003-12-08T09:07:28Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
intend to use this table to store addresses of customers, vendors and
etc. Therefore I have the ENTITY field to identify the address is for
what kind of entity. ID will be the ID of that entity. ADDRESS_TYPE
will be either 'Billing', 'Delivery' and etc.
I did not create a foreign key in my ADDRESS table because I can't.
This table *references* different tables based on the ENTITY field.
Do you mean the absence of a foreign key is the reason why it won't
work?
> At 07:03 AM 8/12/2003 +0000, you wrote:and
> >Hi,
> > I encounter a *scratch-head* reaction with my master-child
> >relationship transaction. My master and child tables are CUSTOMER
> >ADDRESS respectively. I've set their relationship according to themaster
> >TransactionsHandling tutorial lesson 2.
> >
> >Info on child IB_Query:
> > MasterLinks: ADDRESS.ID=CUSTOMER.CUST_ID
> > MasterSource: DSCustomer
>
> Are you sure this relationship is correct? Surely, your detail-to-
> link should be through a foreign key in the ADDRESS table -ADDRESS.CUST_ID
> or something similar. ADDRESS.ID seems like it would be theThe primary key of ADDRESS table is (ID, ENTITY, ADDRESS_TYPE). I
> **primary key** of the address table....
intend to use this table to store addresses of customers, vendors and
etc. Therefore I have the ENTITY field to identify the address is for
what kind of entity. ID will be the ID of that entity. ADDRESS_TYPE
will be either 'Billing', 'Delivery' and etc.
I did not create a foreign key in my ADDRESS table because I can't.
This table *references* different tables based on the ENTITY field.
Do you mean the absence of a foreign key is the reason why it won't
work?
> Helen