List Info

Thread: many-to-many ?




many-to-many ?
country flaguser name
Italy
2007-10-04 03:27:03
      * Hi all, I couldn't find an answer to this on the old
questions;
        if there
is already an answer just point me there.

I have a many-to-many relation:
|  LINKS  |------ N -----< about >------ M -----| 
BRANDS  |

In database is implemented as
-table_links
------ id_r_about
- table_brands
----- name
----- id_r_about
- table_r_about
----- id_r_about
----- id_links
----- id_brand
----- desc
----- site

or
|  LINKS  | N----------1 | r_about | 1-----------N |  BRANDS
 |

In glom I would like to show a form for the LINKS table with
a combo
with the names of the brands (table_brands.name). In
background glom
while showing the brand's name -taken from the BRANDS table-
should
insert the new id_r_about, while creating a new row in
table_r_about
with the selected brand's id and the link's id currently in
edit.

That is what glom SHOULD do, but as I guess this is a
feature not yet
available, so I did a

WORKAROUND.

When showing the form for LINKS a combo is displayed with
table_r_about.id_r_about and table_r_about.desc: where
table_r_about.desc is table_brands.name. 

table_r_about has to be properly set.

My question is: 
is there a method to automatically copy table_brands.name
in
table_r_about.desc in the form for adding a new
table_r_about's row? Now
I'm copying it by hand but it is boring and error prone.

Thanks in advance

-- 
Fede
____________________________________________________________
____________
       mune (at) fsfe.org            Ing. Federico
Munerotto
   home    http://www.mune-web.eu
Public key http:
//www.mune-web.eu/personal/misc/pk/pk.html
Signoraggio     htt
p://www.mune-web.eu/personal/misc/signoraggio/
____________________________________________________________
____________
      posta firmata digitalmente      |      mail digitally
signed
______________________________________|_____________________
____________
A banker is a fellow who lends you his umbrella when the sun
is shining
and wants it back the minute it begins to rain.
                -- Mark Twain

_______________________________________________
glom-devel-list mailing list
glom-devel-listgnome.org
http://mail.gnome.org/mailman/listinfo/glom-devel-list


Re: many-to-many ?
country flaguser name
Germany
2007-10-04 03:49:30
Sorry, could you try again to explain what theses tables
should show, in
terms of what a normal user would understand?

On Thu, 2007-10-04 at 10:27 +0200, Federico Munerotto
wrote:
> * Hi all, I couldn't find an answer to this on the old
questions;
>         if there
> is already an answer just point me there.
> 
> I have a many-to-many relation:
> |  LINKS  |------ N -----< about >------ M -----|
 BRANDS  |
> 
> In database is implemented as
> -table_links
> ------ id_r_about
> - table_brands
> ----- name
> ----- id_r_about
> - table_r_about
> ----- id_r_about
> ----- id_links
> ----- id_brand
> ----- desc
> ----- site
> 
> or
> |  LINKS  | N----------1 | r_about | 1-----------N | 
BRANDS  |
> 
> In glom I would like to show a form for the LINKS table
with a combo
> with the names of the brands (table_brands.name). In
background glom
> while showing the brand's name -taken from the BRANDS
table- should
> insert the new id_r_about, while creating a new row in
table_r_about
> with the selected brand's id and the link's id
currently in edit.
> 
> That is what glom SHOULD do, but as I guess this is a
feature not yet
> available, so I did a
> 
> WORKAROUND.
> 
> When showing the form for LINKS a combo is displayed
with
> table_r_about.id_r_about and table_r_about.desc: where
> table_r_about.desc is table_brands.name. 
> 
> table_r_about has to be properly set.
> 
> My question is: 
> is there a method to automatically copy
table_brands.name in
> table_r_about.desc in the form for adding a new
table_r_about's row? Now
> I'm copying it by hand but it is boring and error
prone.
> 
> Thanks in advance
> 
> _______________________________________________
> glom-devel-list mailing list
> glom-devel-listgnome.org
> http://mail.gnome.org/mailman/listinfo/glom-devel-list

-- 
murraycmurrayc.com
www.murrayc.com
www.openismus.com

_______________________________________________
glom-devel-list mailing list
glom-devel-listgnome.org
http://mail.gnome.org/mailman/listinfo/glom-devel-list


Re: many-to-many ?
country flaguser name
Italy
2007-10-04 10:00:07
On gio, 2007-10-04 at 10:49 +0200, Murray Cumming wrote:
> Sorry, could you try again to explain what theses
tables should show, in
> terms of what a normal user would understand?

Ok, I simplify it.

two tables A and B are linked with a many-to-many relation:
| A |-------------N-| relation |-M--------------| B |

When inserting a row for A I would like a combo with data
taken from B.

> On Thu, 2007-10-04 at 10:27 +0200, Federico Munerotto
wrote:
> > * Hi all, I couldn't find an answer to this on the
old questions;
> >         if there
> > is already an answer just point me there.
> > 
> > I have a many-to-many relation:
> > |  LINKS  |------ N -----< about >------ M
-----|  BRANDS  |
> > 
> > In database is implemented as
> > -table_links
> > ------ id_r_about
> > - table_brands
> > ----- name
> > ----- id_r_about
> > - table_r_about
> > ----- id_r_about
> > ----- id_links
> > ----- id_brand
> > ----- desc
> > ----- site
> > 
> > or
> > |  LINKS  | N----------1 | r_about | 1-----------N
|  BRANDS  |
> > 
> > In glom I would like to show a form for the LINKS
table with a combo
> > with the names of the brands (table_brands.name).
In background glom
> > while showing the brand's name -taken from the
BRANDS table- should
> > insert the new id_r_about, while creating a new
row in table_r_about
> > with the selected brand's id and the link's id
currently in edit.
> > 
> > That is what glom SHOULD do, but as I guess this
is a feature not yet
> > available, so I did a
> > 
> > WORKAROUND.
> > 
> > When showing the form for LINKS a combo is
displayed with
> > table_r_about.id_r_about and table_r_about.desc:
where
> > table_r_about.desc is table_brands.name. 
> > 
> > table_r_about has to be properly set.
> > 
> > My question is: 
> > is there a method to automatically copy
table_brands.name in
> > table_r_about.desc in the form for adding a new
table_r_about's row? Now
> > I'm copying it by hand but it is boring and error
prone.
> > 
> > Thanks in advance

I hope this is more clear.

Thanks
-- 
Fede
____________________________________________________________
____________
       mune (at) fsfe.org            Ing. Federico
Munerotto
   home    http://www.mune-web.eu
Public key http:
//www.mune-web.eu/personal/misc/pk/pk.html
Signoraggio     htt
p://www.mune-web.eu/personal/misc/signoraggio/
____________________________________________________________
____________
      posta firmata digitalmente      |      mail digitally
signed
______________________________________|_____________________
____________
A banker is a fellow who lends you his umbrella when the sun
is shining
and wants it back the minute it begins to rain.
                -- Mark Twain

_______________________________________________
glom-devel-list mailing list
glom-devel-listgnome.org
http://mail.gnome.org/mailman/listinfo/glom-devel-list


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )