7
Views
2
Comments
Solved
how can delete value where was store three 3 entity (Critter)(Round Creiter)Voting)
Application Type
Reactive


how can delete value where was store 3 entity (Critter)(Round creiter)Voting)

i need delete creitria where creitria  store  in an entity (creitria)

 this entity has relationship with an entity (Round) many to many

and has other relationship with an entity (voting) one to many

how i can delete the creitria 

digram.JPG

mvp_badge
MVP
Solution

Hello there Andrew,

Hope you are doing well.


As far as I understood, you want to delete a record in Creitria entity and delete the corresponding records in RoundCreitria and Voting entities for that specific CreitriaId.


First of all, I think there are some things that you can improve in your data model. It seems that your Voting entity has redundant information because it has a RoundId, CreitriaId and RoundCreitriaId. So you are already pointing to RoundCreitria entity which also has a RoundId and a CreitriaId, I don't think that you need these 2 foreign keys in this entity:


Regarding to your delete question:

In your RoundCreitria entity, you may set the Detele Rule property value of Creitriaid attribute to Delete:

This way, when a record from Creitria entity is deleted, the records from RoundCreitria entity where this specific CreitriaId is stored are also deleted. You may do the same in Voting entity.


If you want to delete a Creitria record, you just need to use DeleteCreitria action:


Hope that this helps you!


Kind regards,

Rui Barradas

As in the attached demo

EmployeeVoting.oml

mvp_badge
MVP
Solution

Hello there Andrew,

Hope you are doing well.


As far as I understood, you want to delete a record in Creitria entity and delete the corresponding records in RoundCreitria and Voting entities for that specific CreitriaId.


First of all, I think there are some things that you can improve in your data model. It seems that your Voting entity has redundant information because it has a RoundId, CreitriaId and RoundCreitriaId. So you are already pointing to RoundCreitria entity which also has a RoundId and a CreitriaId, I don't think that you need these 2 foreign keys in this entity:


Regarding to your delete question:

In your RoundCreitria entity, you may set the Detele Rule property value of Creitriaid attribute to Delete:

This way, when a record from Creitria entity is deleted, the records from RoundCreitria entity where this specific CreitriaId is stored are also deleted. You may do the same in Voting entity.


If you want to delete a Creitria record, you just need to use DeleteCreitria action:


Hope that this helps you!


Kind regards,

Rui Barradas

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.