I'm sorry to "revive" this thread but this problem isn't solved.

I've rewritten the app without using ClassDesigner for better
understanding the inner logic of dabo.
In the form i've the combo with the values of "tipologia" table, when
i change the value and click save i want that the
foreign key on the "articoli" table ("id_tipologia") gets changed.
This happens only visually and if i quit and
restart the app the old value "reappears" on the grid.

Here the dForm:
http://pastebin.com/m1440090c
and here the two bizobj:
http://pastebin.com/m6c5eb911   (Articoli)
http://pastebin.com/m77914e8e   (TIpologia)

I've correctly added the FK "id_tipologia" as you suggested but i
don't see any difference.

I've tried to enable SQL output as suggested in the dabo wiki, but
when i click on save i get only
Database Activity Log: Thu Oct 15 22:45:19 2009: SQL: begin (implicit,
nothing done)
Database Activity Log: Thu Oct 15 22:45:19 2009: SQL: commit

Is there a way to enable full sql log ?
Thanks
Emanuele

On Thu, Sep 17, 2009 at 4:05 AM, Ed Leafe <e...@leafe.com> wrote:
> On Sep 16, 2009, at 3:45 PM, Emanuele Gesuato wrote:
>
>> when i select an element in the grid, a form show the selected element
>> in several textfields. Over the textfields
>> i've a combobox in which i show all the elements of table B.
>>
>> Following this one
>> http://wiki.dabodev.com/HowToPopulateAndUseListControls
>> i can show the relative B.field1 in the combobox when i select an
>> element in the grid. But when i change it and click on save the
>> foreign key
>> isn't updated in table A (self.Form.save() issued). However the
>> combobox shows correctly the B.field1
>> value.
>
>
>        I went back and looked at your code, and I think you have a problem
> in that you don't have the FK from the Articoli table in your bizobj.
> Since the combo is bound to that field, it must be in the bizobj in
> order for the changes to the combo to affect the bizobj. Instead, you
> have the related PK column in the Tipologie table in the Articoli
> bizobj. What would happen if you changed the line:
>
> self.addField("tipologie.id", alias="tipologie_id")
>
>        to:
>
> self.addField("id_tipologia")
>
> ... which appears to be the FK in the Articoli table to Tipologie.
>
>
>
> -- Ed Leafe
>
>
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/32b9ac3d0910151355q332a92d2pe94fdc226302e...@mail.gmail.com

Reply via email to