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:
Add a new Set with object type Contact
Click +New and fill a name while keeping other fields empty
+New relations named “Alias”
Enable “Alias” so that it shows in the Contact sets.
Fill in Name and Alias
Clict the name, the object Contact is opened
Expected behavior
“Alias” relation should be visible in the contact object, however, it is not visible.
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):
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?
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