Skip to content

Allow for lazy getting of To-One relations #2

@maurei

Description

@maurei

Given the following model

@Model()
export class B extends Resource {
	@Field()
	public id: string;
 }
@Model()
export class A extends Resource {
	@Field()
	public id: string;
	@ToOne()
	public toOneB: ToOneRelation<A,B>;
 }

Allow for

a = new A();
await a.toOneB.fetch();

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions