Question

Updating SDE Feature Classes That Are Involved in a Relationship Class

  • 28 February 2017
  • 4 replies
  • 49 views

Badge

I have a series of workspaces that sync an Oracle Database with an SDE database every hour (ORACLE_SPATIAL and GEODATABASE_SDE Readers > GEODATABASE_SDE Writer). I created several relationship classes in the SDE database (via ArcCatalog), and now my workspace fails to update any of the feature classes that are involved in a relationship class.

I am receiving the following error:

 

Error while retrieving an ArcObjects update cursor for the table/feature class 'DBO.EL_SERVICE_POINT'. The error number from ArcObjects is: '-2147216556'. The error message from ArcObjects is: {Objects in this class cannot be updated outside an edit session}

If I delete the relationship classes, the Feature Types update as expected.

I tried setting geodb_feature_has_relationships to 'yes' before writing to SDE, but I still received the same error.

Also, the Transaction Type on the SDE reader and writer is set to "Versioned Edit Session", as I am updating a versioned SDE database.

Does anyone have any suggestions on how to fix this problem?

Thank you,

Courtney


4 replies

Badge +2

The article Working with Geodatabase Relationship Classes gives quite a lot of detail about building relationships. There is a lot of detail since a lot depends on the type of relationship you have (M:N, attributed, ...)

Badge

The article Working with Geodatabase Relationship Classes gives quite a lot of detail about building relationships. There is a lot of detail since a lot depends on the type of relationship you have (M:N, attributed, ...)

Thanks, Mark. I reviewed that article, but I couldn't find anything to help with my particular problem. The relationships are already built, and I don't want to modify them, I just want to update a few records in one of the feature classes - I tried setting the attributes mentioned in the article (geodb_feature_has_relationships, etc), but I am still unable to make edits to any feature type that happens to have a relationship. Maybe I am missing something? Do I have to update the relationship in order to insert, update, or delete a record in one of the feature classes?

 

Badge +6

Hi Courtney,

 

Regarding your question, you should be able to update the attributes in the feature classes without having to delete the relationships.When you are adding the reader to FME, do you have the 'Ignore Relationships Info' checked? If not, I'd suggest trying to run the workspace with this set. Since you only want to update the tables, the relationships don't need to be involved. The settings that you have for 'versioned edit session' should work and also make sure the writer mode is set to update.

 

 

If it is still not working, please let us know.Kind regards.

Badge

Thank you for your responses! @MattAtSafe and others from the Safe Support team helped me figure out that the feature classes needed to be re-versioned after the relationship classes were created. After I re-versioned the feature classes via ArcCatalog, the FME process ran as expected. Thank you all for your help!

Reply