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

Model hooks support async/ await #177

Open
shatayuD opened this issue Oct 16, 2018 · 0 comments
Open

Model hooks support async/ await #177

shatayuD opened this issue Oct 16, 2018 · 0 comments

Comments

@shatayuD
Copy link

Hello,

I'm using ORM and it is very good. But I want to use model hok function for some kind of validation which is database specific.

I will query & check if some data exsists or not depending on that if we have to save or not has to be decided.

Is there any way so that we can use model hooks wait until prmise is returned then take true or false and proceed to save ?

like before_saveAsync or
before_save : await finction(){
}

Is anything supported like this ? not in the documentation so asked here.

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