[dabo-users] Workaround for "One Child : Many Parents" ?

Author: Vineet Deodhar

Posted: 2011-11-25 at 07:58:44

> Subject: Re: [dabo-users] many parents : one child

> Message-ID:<9617F637-8E98-4B15-82FB-535A874998DA@leafe.com>

> Content-Type: text/plain; charset=us-ascii

>

> On Nov 24, 2011, at 9:17 AM, Vineet Deodhar wrote:

>

>> In this case, what would you do (considering yourself in my shoes)?

>> In employees table, we have to link employee record to a category& also to a financial account.

> Generally, the category and accounts would be children of employee: their current values depend on the selected employee. When you select a different employee, the related records in category and account would be selected.

>

> -- Ed Leafe

But in this case, pk's of 'category' and 'accounts' are fk's in 'employee'.

And the chain of table-relationship is deeper than depicted in this

simple example.

Can there be any workaround for this kind of situation?

Jacek has come up with a suggestion as under --

===========

Simply, you can't. It's like paramecium, there is only one parent, no more.

But if you need such behaviour, you can override dBizobj.getParams()

method, e.g. for first relation use LinkField ("acid") and for the

second addWhere() method:

...

self.addWhere("catid = ?")

...

def getParams(self):

return (self.biz_cat.getFieldVal("catid"),)

But I never tried this, so there may be additional steps to take.

-- Regards Jacek Ka?ucki

===========

Can anybody pl. elaborate on this point?

I am not able to digest it.

Any help is highly appreciated.

Regards,

Vineet

_______________________________________________

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/4ECF9104.7010105@yahoo.com

©2011 Vineet Deodhar