Select to view content in your preferred language

editing related records in a 1:M (one to many) relationship

6971
13
03-12-2012 02:22 PM
SebastianRoberts
Frequent Contributor
Hello,
  I've seen the sample for Editing Related Records, but this sample just lets you change one value in the related table of a one to one relationship.  I would like to a user to be able to click on an existing point feature, be able to change attributes for that point feature, as well as have access to one or more related records.  The related features could be displayed in the attribute inspector, or in a side panel as a list.  In any case a user would need to be able to click on one of the existing related records to edit it, delete a related record, and add a new related record.  Both the feature class and related table are in SDE with an established relationship class, and are part of the mapservice I am referencing.
  Has anyone done something similar or have any ideas on how to get started?
Thanks,
Sebastian Roberts
13 Replies
SrijanaTuladhar
Occasional Contributor

Hi,

I am not sure if I should post this question here but we noticed that when we delete a feature from the feature class, it also deletes all the records that are related to that feature from the related table which we don't want to do. Have you guys experienced anything like that?  Thanks for your help.

Sri

0 Kudos
SebastianRoberts
Frequent Contributor

Yes that is the expected behaviour when you have a composite relatiosnship.  When you create a relationship class, you have  the option of creating a simple or a composite relationship.  A simple relationship "exists between two or more objects that can exist independant of each other", in a composite relationship the "lifetime of the objects in the destination tabel is controlled by the lifeftime of their related object in the origin table".

Sebastian

0 Kudos
SrijanaTuladhar
Occasional Contributor

Thanks but I am experiencing the behavior in a simple relationship class.

0 Kudos
SrijanaTuladhar
Occasional Contributor

I actually figured out the issue, it did not delete the records from the related table, but it disconnected the records and made the key null, so I could go back and link/relate them to the feature in the origin table.  Thanks for you help anyway.

0 Kudos