Skip to main content

So I'm adding component subtypes to pre-existing entities with pre-existing relationships. 

It would appear that in some (all?) circumstances, this does not create the subtype-subtype copy of the main relationship. 

If I go to the main entity, relationships, delete the relationship, leave the relationships screen (to update), go back and re-create the relationship, then it adds a copy it to all the sub-types (it does not check or confirm the other relationships from this main entity, they have to be done one by one. 

Does anyone have a utility to check and refresh all these relationships? I've tried checking in the database, but the info I'd need to map the subtypes is stored in tplactual, and therefore hard to process as data. 

I think I'd need two copies of ucrelsh and ucgroup in the DICT model to be able to write a utility... 

Thoughts? 

Iain

So I'm adding component subtypes to pre-existing entities with pre-existing relationships. 

It would appear that in some (all?) circumstances, this does not create the subtype-subtype copy of the main relationship. 

If I go to the main entity, relationships, delete the relationship, leave the relationships screen (to update), go back and re-create the relationship, then it adds a copy it to all the sub-types (it does not check or confirm the other relationships from this main entity, they have to be done one by one. 

Does anyone have a utility to check and refresh all these relationships? I've tried checking in the database, but the info I'd need to map the subtypes is stored in tplactual, and therefore hard to process as data. 

I think I'd need two copies of ucrelsh and ucgroup in the DICT model to be able to write a utility... 

Thoughts? 

Iain

Hi Iain
I do have four copies of the model DICT
DICT itself
DICT_A and DICT_B for comparing an "object"-A to an "object"-B
DICT_SAVE (the original)

With OPEN and CLOSE (on DICT_x) I access every database with DICT-tables, even on other servers 🙂

Then I do have compare utilities for almost all (common used) objects in the DICT.

Not yet implemented is a compare of a table to its sub-entities.
As we use sub-entities for other addational relations, a compare would always show you differences

Back to your problem:
To check weather a releatione exists or not, it should adequate to look in UCRELSH for the (meta-)fields u_glab and u_rglab
Only when you need informations about the involved (your projects-)fields, you have to extract them for u_doc.


Ingo




So I'm adding component subtypes to pre-existing entities with pre-existing relationships. 

It would appear that in some (all?) circumstances, this does not create the subtype-subtype copy of the main relationship. 

If I go to the main entity, relationships, delete the relationship, leave the relationships screen (to update), go back and re-create the relationship, then it adds a copy it to all the sub-types (it does not check or confirm the other relationships from this main entity, they have to be done one by one. 

Does anyone have a utility to check and refresh all these relationships? I've tried checking in the database, but the info I'd need to map the subtypes is stored in tplactual, and therefore hard to process as data. 

I think I'd need two copies of ucrelsh and ucgroup in the DICT model to be able to write a utility... 

Thoughts? 

Iain

Hi Inigo, 

Yeah we use the functional subtypes for different relationships too.

My issue was that it doesn’t create the relationships for component subtypes of either the main entity or its functional subtypes, when you generate the component subtypes from them. 

So entityA relates to entityB, but entityAssv doesn’t relate to entityBssv. If you delete the relationship, and re-create it, it creates relationships between the component subtypes of the subtype so uniface obviously needs them. 

In the end I built myself a utility, linking urelesh to ucgroup to ucgroup again to get the subtypes, to ucgroup again to get the same subtype of the related entity, to urelsh again to get the appropriate duplicate relationship (to see if it was missing) and then create it. 

Regards,

Iain