-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
DDC-2783: EntityManager#transactional()
support for non-truthy values
#3531
Comments
Comment created by stof: I agree that this makes the method hard to use. And I don't undertstand why it would replace the return value. What was the intention for this Benjamin ? |
Comment created by @guilhermeblanco: [stof] [beberlei] I'm considering to remove the ternary and always return the callback result. |
Comment created by @Ocramius: [~guilhermeblanco] this was already refused before because of the BC break. |
Is there any chance to change this strange behavior? |
I have not. Thank you for rapid response! |
EntityManager#transactional()
support for non-truthy values
Closing as per #6147 👍 |
Jira issue originally created by user chebba:
The problem:
Any response from transactional callback which is evaluated to *false* (empty array, empty string, 0, null, etc) becomes true
There is the old resolved issue DDC-1336, which describes this behavior.
@return
tag is clear now.But this logic is blowing mind and leading to unexpectable results. The expected behavior is just return callback result, i don't see any good use cases for current implementation.
It requires a BC break. Can the deprecation process be started to change this behaviour in few major releases?
The text was updated successfully, but these errors were encountered: