wrenidm icon indicating copy to clipboard operation
wrenidm copied to clipboard

Data Disappears when You Change the Name of a Managed Object

Open GuyPaddock opened this issue 6 years ago • 0 comments

Affected Versions

  • 5.5.0 (master, at 731844f)

Summary

If the "name" of a managed object is changed, any existing records for that managed object type seemingly disappear from the IDM database.

Steps to Reproduce

  1. Start OpenIDM with any project that has mappings (e.g. the "Getting Started" sample project).
  2. Navigate to http://localhost:8080/admin/
  3. Navigate to Manage -> User.
  4. Click "New User".
  5. Fill out the form and save it to create the new user.
  6. Navigate to Manage -> User.
  7. Examine the user list to confirm the new user is present in the list.
  8. Navigate to Configure -> Managed Objects.
  9. Click on "User".
  10. Change the "Managed Object Name" to "users".
  11. Save the form.
  12. Navigate to Manage -> User.
  13. Examine the user list.
  14. Click "New User".
  15. Fill out the form and save it to create the new user.
  16. Navigate to Manage -> User.
  17. Examine the user list to confirm the new user is present in the list.
  18. Navigate to Configure -> Managed Objects.
  19. Click on "User".
  20. Change the "Managed Object Name" back to "user".
  21. Save the form.
  22. Navigate to Manage -> User.
  23. Examine the user list.

Expected Results

Either:

  • In steps 7, 13, 17, and 23, all users in the system should be shown (Preferred); OR
  • In steps 11 and 21, an error message should appear that indicates it is not possible to change the name of a managed object that has data associated with it.

Actual Results

  • In steps 7 and 23, only the user created in step 5 appears in the list (the user created in step 15 does not appear in step 23).
  • In step 13, no users appear in the list.
  • In step 17, only the user created in step 15 appears in the list.

Additional Information

It appears that the system matches managed objects in the DB by their name, and does not change this name in the DB when the managed object name changes. This explains why switching the managed object name to a different one and then switching it back seems to "restore" the missing managed objects.

In 5.5, with OrientDB as the repo, changing the managed object name letter case (e.g. changing "user" to "User") does not seem to affect the ability for the objects to be located. This appears to at least be an improvement over behavior seen in 4.0 with PostgreSQL in which merely changing letter case causes objects to disappear.

GuyPaddock avatar Mar 30 '18 00:03 GuyPaddock