Question regarding dependent expansion relationship between tables.
Frank Fock
Frank.Fock____t-online.de
Wed Jan 29 01:14:09 CET 2003
Hi Paresh,
Although there is no code generated for table relationships
other than augmentation by AgentGen 1.8 and AgenPro 2, AGENT++
fully supports such relationships. Just add the dependend table
as a listener to the parent table by MibTable::add_listener().
Whenever a row of the parent table is then initialized, added,
activated, deactivated, or removed, one of the methods row_init,
row_added, row_activated, row_deactivated, or row_delete will
be called on the dependent table.
This will allow you to add code in these methods to add, update,
or delete related rows in the dependent table.
Note: If the action that triggered the row modification on
the parent table is a Request, then the parent table and all
dependent tables (thus all listeners of the parent) will be
locked (start_synch()/end_synch())!
Hope this helps.
Best regards,
Frank
Paresh Borkar wrote:
> Hi,
>
> I have two tables in my mib which are linked. Say these tables are table
> A and B respectively. Table A and B exhibit a 'dependent expansion
> relationship', with table A as the base table and table B as the
> expansion table. That is, say Table A has index P and then table B has
> index {P, Q}. And for every row in table A there will be zero or more
> rows in table B.
>
> I have generated the code for these tables using Agent Gen Pro v1.8. I
> wanted to know if the Agent++ libraries support a cascaded delete (i.e.
> if one deletes a row in table A, then the corresponding rows in table B
> also are deleted).
>
> If there is no such support, can someone please suggest a generic way of
> achieving this.
>
> Thanks in advance.
>
> Regards,
> Paresh.
>
>
More information about the AGENTPP
mailing list