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

Improve the entity creation workflow #3

Open
Piquinikis opened this issue Mar 7, 2022 · 0 comments
Open

Improve the entity creation workflow #3

Piquinikis opened this issue Mar 7, 2022 · 0 comments

Comments

@Piquinikis
Copy link

Piquinikis commented Mar 7, 2022

When we need to create a new schema instance, there is a lot of repetitive tasks that sometimes it's finished in a copy/paste action.

For example:

export function getOrCreateOrder(id: string): Order {
	let entity = Order.load(id)
	if (entity == null) {
		entity = new Order(id)
		entity.cancelled = false
	}
	return entity as Order
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant