A type references multiple other types by the same discriminator (relationship type):
@Relation("DESCRIBED_BY")
GetterAccessor getGetter();
void setGetter(GetterAccessor getterAccessor);
@Relation("DESCRIBED_BY")
SetterAccessor getSetter();
void setSetter(SetterAccessor getterAccessor);
@Relation("DESCRIBED_BY")
AutoAccessor getAutoAccessor();
void setAutoAccessor(AuotAccessor autoAccessor);
Setting all three values has as result exactly one relation, which is the last one that has been set. This is caused by the current approach of checking on datastore level if a single relation using a specific discriminator already exists and removing it before creating a new relation.
It should be possible to either
- support this model explicitly
- issue a warning on startup that the same discriminator is used for the same to-one relation