Skip to content

Support @Backlink for ToOne<T> ? #1237

@pangyulei

Description

@pangyulei
Media {
    subtitile = ToOne<Subtitle>()
}
Subtitle {
    media = ToOne<Media>()
}

now I have to do sth like

media.subtitle.target = xxx
mediabox.put(media)
subtitle.media.target = xxx
subttilebox.put(subtitle)

to maintain both side relation right.
Its obviously if I can add @Backlink() to one of them,

@Backlink(subtitle)
media = ToOne<Media>()

then I can just do mediabox.put(media) while maintain the relations.
I searched the internet, but no where saids why its not supported, so I wonder its an new feature maybe?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions