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

How to write business logic on Entity creation? #38

Open
siddiquipro opened this issue Nov 1, 2018 · 2 comments
Open

How to write business logic on Entity creation? #38

siddiquipro opened this issue Nov 1, 2018 · 2 comments

Comments

@siddiquipro
Copy link

siddiquipro commented Nov 1, 2018

While creating entity i want to add some business logic and also want to create related entities, Where can i update them ?

@htammen please help as it is important

@maxwiese
Copy link

I think you can do this via: https://loopback.io/doc/en/lb3/Adding-application-logic.html .
But i can't figure out how that worked with OData.

If you do so, please write me back!

@andrii-naumovych
Copy link

@mohammadsiddiqui Basically, what you need is not related to OData component. This is about how loopback's Models work.

I think you need to use "before create" or "persist" operation hooks. There you can do all the needed data manipulations.

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

3 participants