Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for lazy getting of To-One relations #2

Open
maurei opened this issue Sep 28, 2018 · 1 comment
Open

Allow for lazy getting of To-One relations #2

maurei opened this issue Sep 28, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@maurei
Copy link
Owner

maurei commented Sep 28, 2018

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();
@maurei maurei added the enhancement New feature or request label Sep 28, 2018
@maurei
Copy link
Owner Author

maurei commented Sep 28, 2018

requires #4 to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant