on Wish: Code for associations
Author: ulrichmerkel@web.de (ulrich-merkel)
Hi Dino (in reply to uniface.communityzero.com/content/lists),
lets assume we have a $paintedentities precompile directive;
which is a comma separated list of entities,
it is easy to put your association code in the "one" entity:
#for ent = (<$paintedentities>)
#if <ent> = mymanyent
... put your association code in here ...
#endif
#endfor
#undefine ent
For the moment in time, I create a
#define paintedentities= ent1,ent2,ent3
from the repository with the help of a little utility.
A question: Uniface recognises Relationships(one-many), not associations (may be both directions).
Do you need to differenciate between the different frame-in-frame possibilities?
In this case I recommend to provide your business logic as "include procs"
which can be handled very easy if you use library:proc logic.
I use to define these implementations in one place:
#define implements = ent_ent1:as_ent3,ent_ent3:as_ent1
And somehere in the default part of the code is:
#for inc = (<implements>)
#include <inc>
#endfor
#undefine inc
Success, Uli
This page has no comments.