-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Be able to run the afterFind trigger automatically after saving object #7064
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
Comments
Thanks for suggesting. I don't fully understand your proposal, but this:
sounds much like an XY problem. It seems as if you were looking for a solution to a problem that results out of your current app concept. Maybe take another look at that underlying app concept. If you think your current concept is valid, can you please elaborate your use case with a simple 1. - 2. - 3. steps list in which you describe the suggested feature? |
@mtrezza Thanks for your feedback! I will describe a case similar to mine to be more understable 😉 The use case is the following:
So, my objective is to find a solution to be able to do the same without the My case is more complex but this is the same logic. To rephrase my question: Is there a way to describe how the object should be retrieve from the database / serve side to the application / user side after a Previously I mentioned the fact that it can be useful to be able to run the Is my situation / problem more understable? Thanks in advance 👍 |
Thanks for providing more details, I think I understand what you are trying to do. I never came across the use case of unilateral class synthesis. Thumbs up for creativity 🤓
It seems you decided to solve an original problem Maybe it helps to discuss |
@mtrezza Thanks for your feeback! I understand what do you mean but I'm not sure that this is going to solve the problem. It can maybe be a solution for this case but I think we can have the same problems with other cases. My current problem is the following: I totally want to dissociate my server / backend architecture from my application / frontend architecture. If we take the example of a classic REST API, we can do that. The application side just wants to speak with the server without caring about the database implementation. So my current problem / issue here is not to find a good way to build my classes architecture to feat with Parse, it's just to say that I think it can be very good to allow developpers to have a flexibility on that. If a take my previous example, when I do a After that we can imagine many dev bahaviors:
I hope that this is clear and understable 😅 My proposition for this issue is to allow devs to define how they want to "received" data from the server after a To conclude, I would say that this issue is just part of a larger one: Allow developpers to have a huge flexibility with Parse, even if their architecture are not perfectly optimized I will be happy to read your feedback 😉 |
I'm closing this as it seems to be in an early stage of discussion about Parse Server architecture. Discussions are better suited in our Community Forum while we expect feature requests on GitHub to be in a more advanced conceptual stage. Feel free to comment if you have any questions and we can re-open this issue. |
Hi @AurelienVasseur, after #7839 is merged, you will be able to use Let's say you have the field "secret" that you want the server to generate when a new object is created, and you don't want to allow users to edit that field:
|
Is your feature request related to a problem? Please describe.
I would like to be able to execute an
afterFind
trigger after saving an object on database.For example, if we change the object before saving it, we will receive these changes on the app automatically.
But maybe in the app we don't want them.
This situation appears when an object don't have the same interface between the app and the database.
So currently, to fix my problem I need to do something like that:
So I think it's not good in term of optimization.
And with that I always run the
beforeFind
trigger while I don't want.I'm not a Parse expert so there is maybe currently a way to do that (or to do something on the same spirit).
If this is the case please say it to me.
Describe the solution you'd like
save
call as an optionbeforeSave
trigger as a third parameterAn other way to see the problem can be: How can I execute a code which will change the returned value on a
beforeSave
trigger?Thanks you in advance 😃
The text was updated successfully, but these errors were encountered: