On Jun 9, 2006, at 7:53 AM, Simen Haugen wrote:

I have just found this framework, and I must say that I am very excited
about it. It seems very flexible and powerful, but I have not yet
grasped the overall design or how to use it.

        That's OK - sometimes I feel the same way, and I wrote much of it!  ;-)

I'm trying to create a simple application that retrieves two tables,
link them together, and shows a custom view.
[snip]
I want to ling them on Type_id, and show Task_id, Type.Name.

I do not want to use datanav.Form, so I followed the grid screencast
(the screencasts are pretty neat).

I guess I could just run "select task.id, type.name from task, type
where task.type_id=type.type_id", but I don't know how that will work
when I try to update the tables (I want two tables).

Normally you'd want to create a business object for each table, but in this case you simply want to denormalize the type table to get the type name, right?

I haven't played with this much, but I know Paul has. In this case, you can create a single bizobj for the main table, and define its SQL like this:

biz.addField("main.f1")
biz.addField("main.f2")
biz.addField("main.f3")
biz.addField("child.fname")
biz.setFrom("main join child on main.childFK = child.pk")

In other words, define the fields you want returned, and then define the join in the FROM clause. Try that out and let me know how it works.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to