Hi there,

I'm trying to follow the example in the Step-By-Step Guide of how to use a
join within an app.  I'm using the ClassDesigner and was able to get the
data field to display the correct information from the joined table in the
text box, but when I try to save the data, I get an error saying that Dabo
was trying to save the joined information to the wrong table.  In other
words:

The `parts` table contains the majority of the information for the app.
The `categories` table's index corresponds to the foriegn key
`parent_category` in `parts`.
I had to set the DataField and DataSource of the text box to 'name' and
'parts' respectively to get it to display right.
In my bizobj code, I do the following:

def createBizobjs(self):
    class CategoriesBizobj(dabo.biz.dBizobj):
        def afterInit(self):
            self.DataSource = "categories"
            self.KeyField = "index"
            self.addField("categories.index")
            self.addField("categories.name")
            self.addFrom("categories")

    class PartsBizobj(dabo.biz.dBizobj):
        def afterInit(self):
            self.DataSource = "parts"
            self.KeyField = "index"
            self.addField("parts.index")
            <snip>
            self.addField("parts.parent_category")
            self.addField("categories.name")
            <snip>
            self.addFrom("parts")
            self.addJoin("categories", "parts.parent_category =
categories.index")

    partsBizobj = PartsBizobj(self.Connection)
    self.addBizobj(partsBizobj)

    catsBizobj = CategoriesBizobj(self.Connection)
    self.addBizobj(catsBizobj)

Then when I try to save an entry, I get:

Dabo Error Log: Tue Oct 07 16:12:32 2008: Error in scanChangedRows: (1054,
"Unknown column 'parts.name' in 'field list'")
SQL: update `parts` set `parts`.`name` = 'Comparator / OP AMPs' where
`parts`.`index`=1

What am I doing wrong?

Thanks,
Mike M.


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
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/[EMAIL PROTECTED]

Reply via email to