Notifications
Announcements
No record found.
Dear community,
I have a requirement to develop a composite data entity consisting of one parent and one child entity. Both parent and child entity have a EntityKeys consisting of multiple fields (parent 4, child 5 fields). I develop composite entity consisting of both entities, but when I try to run it, the warning "Composite entity doesn't have primary or unique key. Staging table needs to be altered". Run both entities individually does not give any issue. This gives me the impression that Composite data entities only could run if both parent and child entities have one EntityKey field for each. Is this conclusion correct, or do yours know an example in the standard application, with the use of a composite entity with a multifield Entity Key for both parent and child?
How does that the primary key of the staging table (for "Data entity for hour balance budger worker transactions") looks like? Do you have a relation between staging tables?
You mentioned just entity keys, but the warning is about the staging table.
Hi Martin, StagingIdx consists of the same fields as EntityKey fields + DefinitionGroup + ExcecutionId, so I don't think that this is the problem. I think that the problem is to define a unique relationship between the Parent Table/Entity which is a 3rd party product vs ChildTable/Entity which is my customization.
Table keys(index) looks as follows:
Parent: Fields A, B+"FromDate"
Child: Fields A+B+"TransDate"+C+D
I have chosen to key the Entity and Staging Table to the Parent fields A+B, but I think that the "FromDate" should also be linked, which is in this particular case not possible as we cannot define conditional keys.
If the entity key of the Parent consists of three keys and your relation uses just two of them, your relation is wrong, because it doesn't uniquely identify the parent.
I have no idea what you mean by a conditional key and you're claiming that including FromDate field in a relation is impossible.
What I mean is that I think that's not possible to create a relationship which is conditional. In this example: creating a relation between the Parent's "FromDate" and the Child "Transdate" field, which is only is a(n) (active) relation if the Childs "TransDate" is bigger than the Parent "FromDate". So far as I know, it's not possible to define such kind of relations. Correct me if I am wrong.
What you're describing is indeed not a table (or entity) relation.
If you stop speculating about things like that a relation may have just a single field, and you describe your business requirement instead, we might be able to suggest a solution that can actually be implemented.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 544 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader