Adding relations to object type is not visible in existing set & vice-versa

Describe the bug
When adding a new relation to the object via the object set, the object itself doesn’t have the relation & also when new relation is added to object type, it is not updated in already created object sets.

I don’t know if it is a feature or bug.

To Reproduce
Steps to reproduce the behavior:

  1. Add a new Set with object type Contact
  2. Click +New and fill a name while keeping other fields empty
  3. +New relations named “Alias”
  4. Enable “Alias” so that it shows in the Contact sets.
  5. Fill in Name and Alias
  6. Clict the name, the object Contact is opened

Expected behavior
“Alias” relation should be visible in the contact object, however, it is not visible.

System Information:

  • OS: Manjaro
  • Device Manufacturer/Model: HP Spectre x360
  • Anytype Version: 0.31.0 (desktop)

I think that’s a feature :sweat_smile:
Sets become more flexible, than it will automatically update everything everywhere. But…

If it’ll be fixed — still be a feature, because u can use 1 relation in many object types. :thinking:

This is indeed how Anytype works. The Object as shown on the canvas is not a representation of all Relations that the Object contains. Hopefully these pictures explain that:

This is an Object with a few Relations in them (note the contents of those):

Now, if I remove the “Address” Relation from the canvas, see what happens if I open the “Relations” pane:

(red box added by me)

This holds true for other methods of adding Relations to Objects, like you mentioned: you add a Relation to an Object via a Set, but note that (I guess in order to keep the database size manageable) this Relation is only added when you add some content. If you add a new column (=Relation) to a Set, this Relation is only added to the Object when you type some content in that Relation for an Object. Otherwise, you would end up with large amounts of empty Relations in Objects.

I quite like this setup as it doesn’t force you to show all Relations in an Object, for example if they are not relevant for the contents, but you still want to be able to filter on it in a Set (or re-add the Relation later on without deleting the contents of the Relation).

Does that clarify Anytypes behavior around Objects and Relations?

1 Like

Aha, I understand it now.
But, still, one small thing.
When you add a relation in object type, and go to set, and open the relations list from top right button, then that new relation is not visible, so that it can be enabled/toggled.
I think it should be present there, irrespective of it being used or not. It would let the sets user know that what relations are in a type, so that one would not add redundant new relations of different name.

I agree there are improvements to be made to make it clear for users when and how Relations are added to Objects and Object Templates.

Could you make a print screen where you expected the behavior to be different? We might want to move your bug into the feature request category once it’s clear what should be changed/improved :slight_smile:

1 Like

Will be fixed alongside with several other not-visible-relations issues

1 Like