Hi community
When i want to charge an unbanlanced entity with my datareader , i always have one rejet for the parent code not found and in the relationship part i find that the parent code is missing , do you know where comes from the problem?
Hi @Tommy0411 ,
Have you checked whether the parent entity member (for which the code is missing) was properly loaded into the system?
As a best practice, it’s usually recommended to separate data readers by having one for loading all members (including any new ones) of an entity, and another for establishing the relationships between them, especially in the case of unbalanced hierarchies.
Kind regards, Hamza
additionally to what @Hamza Mesbahi said: the root member of an unbalanced hierarchy does not have any parent (by design).
Best, Helmut
I understand, but in the relationship view, I can see the parent's description, not its code , which should be loaded at the same time
The member is loaded as defined in the relationship, but only the description appears — the parent code is still missing
this picture shows that you have the root member without parent
The description is that of the root member, and that appears as parent to the next level members.
And, by the way, there can be no description to an entity member that does not have a code, because the code is the member's essential part.
To get to the base of things: your hierarchy is correct, it's just that you will need to load the members of the hierarchy first, then the relationships (like @Hamza Mesbahi already said) —within the relationships don't load a parent (or try to load a parent) to the root member; that's what's caused your issue in the first place.