gnue-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: relations between tables


From: Reinhard Müller
Subject: Re: relations between tables
Date: Mon, 04 Mar 2013 09:08:23 +0100
User-agent: KMail/4.8.5 (Linux/3.2.0-38-generic; KDE/4.8.5; x86_64; ; )

Dear Theanoula,

Am Sonntag, 3. März 2013, 20:48:36 schrieb Theanoula:
> <datasource name="dts_customer" connection="gnue" table="transactor" />
>
> <datasource name="dts_cars" connection="gnue" table="cars"
>  master="dts_customer" masterlink="id" detaillink="customer_id" />
>
> <datasource name="dts_contract" connection="gnue" table="contract"
>  master="dts_cars" masterlink="id" detaillink="car_id" />
>
>
> I have created the primary and foreign keys in the database.
> When I search(in the form) in dts_customer.name I get all the info I need.
> The same happens when I search in dts_cars.car_number(I get everything) but
> when I search in dts_contract.contract_no I don't get the right info.

I haven't really worked with gnue-forms much lately (unfortunately), but IIRC,
chained master-detail has some issues in forms.

Having said that, I would suspect that actually this is not a pure linear
chained master-detail: isn't the contract the thing that connects customers
and cars? So actually dts_cars is a detail to dts_customer, but dts_contract
would also be a detail to dts_customer?

Thinking even more about it: can there be more than one contract per car? Or
wouldn't contract and car be an 1:1 relationship, meaning that you could put
both in the same table?

Just thinking out loud...

Thanks,
Reinhard

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]