Re: foreign key question

Jason Cater <[email protected]>
Newsgroups gmane.comp.gnu.enterprise.general
Organization GNU Enterprise
Message-ID <[email protected]>
I don't fully follow the question -- maybe a complete example would be better. 

But, off the top of my head, it seems that you could do 3 levels of 
master/detail. 

Org Datasource + Block 
   |
  +-- Department Datasource
        | 
        +--  Employee Datasource + Block 

The Department datasource doesn't have to be tied to a block and doesn't have 
to display any fields, but could still be there to link the tables together. 

-- Jason 

On Monday 07 June 2004 02:27 pm, [email protected] wrote:
> Hello, everybody.
>
> I'm putting up a low-ambitious/high-serious app (that, of course, will
> be freely available, when it comes to something shareable;).
>
> I have an employee table linked by foreign key to a dept table, linked
> by foreign key to an org table. The overall view is something like this:
>
> {app}_customer     org_cus < - - - - - - -
> --------------     -------                |
>     id - - - - - - > id  - - - - - - - -  |
>
>                                 org_org | |  loc_address
>                                 ------- | |  -----------
>                              - > id  < -  |    id
>
>                             |    type  - -      |
>                             |    address < - - -
>
>                    org_dept |
>                    -------- |
>                      org - -
>                      id
>         org_employee  ^
>         ------------  |
>            dept  - - -
>            id
> org_comm    ^
> --------    |
> employee - -
>
> I have an issue where a form record needs to hold the key of an employee
> belonging to a known org, but, as said before, employee records are linked
> to dept records, that are linked to org records. That is, there isn't an
> employee field that directly links to an org record. Is there a way for
> doing that kind of thing without re-structuring data?
>
> I've already re-arranged my data structure due to an issue like this,
> i.e., indirect relations between tables, and I was wondering if, in
> fact, things alike could, _already_, be done with gnue-forms.
>
> Thanks for your attention.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.