foreign key question

[email protected]
Newsgroups gmane.comp.gnu.enterprise.general
Message-ID <[email protected]>
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.
-- 
José Esteban
Granada - Spain
http://alcances.net
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.