hi sir, I have a big problem and i neeeeeeeeeeeeeed help as fast as can, I wish i can explain it now i made database and UI with tables one of these tables called (person) another called (partyAddress) these tables already exist and have UI already it works greate [partyAddress] table has no ID Type it just {AuditedAggregateRoot} as shown below and has 2 foriegn keys (partyId) form [party] table and (addressId) form [address] table so what kind of data in [partyAddress] table? like i mentioned there are relations between **address **and **partyAddress **when i store some data in address it stores in partyAdress like images below now i want to make a master-details between them using ABP Suite. I followed the tutorial but you make just existing table in database create ui from scratch no in my case UI already exist i want just master-detail between tables is there a way to make this showed in documentation or not? so please if you have a solution for this problem deal with me like i know nothing and tell me what should i do step by step thank you...
3 Answer(s)
-
0
Hi, in your code
PartyAddress
is a join entity (join-table in the database term) and its only responsibility is to establish many-to-many relationship betweenParty
andAddress
entities. Therefore, I'm not sure it's a good candidate for a master-child relationship.In a master-child relationship, you would ideally have an entity and its data that can be considered as details of it. For example, you may have a customer entity and its contact information, in that scenario, you can define a master entity named
Customer
as a master entity and aContact
entity as a child entity and associate it with the master entity.So, the master and child entity should have a key to establish a relationship and that means the master entity should have a unique identifier (
Id
) and in your case, since thePartyAddress
is the join entity, you can't create a master-child relationship with it. -
0
that's mean that i should re-do the hole solution from scratch what if i already have a project running with UI and all is good but i want to make some relations and pages using ABP Suite?
-
0
that's mean that i should re-do the hole solution from scratch
what if i already have a project running with UI and all is good but i want to make some relations and pages using ABP Suite?In the current structure of the master-child relationship of ABP Suite, yes you should re-configure these three entities.
But if your only purpose is to show the parties and addresses in the row detail view, then you can create a separate solution, establish a master-child relationship with these entities, and apply the "row detail view" codes in your own application. This seems a better approach for you, with this approach, you'll just define some application service methods, and apply the UI changes.