Skip to content

Multiple to-one relations with same discriminator are collapsed into one relation #181

Description

@DirkMahler

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions