Unable to insert nested object in UI with duplicate property names
I have two types called Song and ArtistForSong. Both of these objects have a property called name. When I try to insert ArtistForSong objects during an insertion of a Song the gel UI fails to commit the changes and throws the following error:
SchemaError: cannot create union (default::ArtistForSong | default::Song) with property 'name' it is illegal to create a type union that causes a computed property 'name' to mix with other versions of the same property 'name'
Can you give a minimal schema, and steps to reproduce the error? I'm trying to reproduce with the following schema, and the inserts from the screenshot, but I don't get the error.
type Artist {
name: str;
}
type ArtistForSong {
name: str;
artist: Artist;
}
type Song {
multi artists: ArtistForSong;
}
@jaclarke I can reproduce the error with this schema:
module default {
type ArtistForSong {
optional artist: int64;
optional name: str;
single song := assert_single(.<artists[is Song]);
}
abstract type HasName {
name := '';
}
type Song extending HasName {
multi artists: ArtistForSong {
constraint exclusive;
};
}
}
Here is also a video just in case I am using the UI wrong
https://github.com/user-attachments/assets/703e7114-c41a-47cd-ad0c-0747da91d4d2