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

Bugfix: support method call in Any() on embedded objects array #446

Merged

Conversation

PrudiusVladislav
Copy link
Contributor

@PrudiusVladislav PrudiusVladislav commented Apr 26, 2024

Solves #441, where Any() for embedded objects does not support method call expressions (e.g. Contains(), StartsWith() etc.). So, in addition to BinaryExpression translation support, added the handling of MethodCallExpression case. So, it would allow such constructions as, for example: collection.Where(x => x.EmbeddedCollection.Any(a => a.Property.Contains("Value"))). Previously, only basic BinaryExpressions like the equality check '==' were allowed.

@PrudiusVladislav
Copy link
Contributor Author

Hi, @slorello89, do you have any updates or feedback regarding the PR?)

Copy link
Member

@slorello89 slorello89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added StartsWith and EndsWith to test case, LGTM 👍

@slorello89
Copy link
Member

Thanks for adding this @PrudiusVladislav!

@slorello89 slorello89 merged commit e89de3f into redis:main May 2, 2024
1 check passed
slorello89 added a commit that referenced this pull request Jun 6, 2024
* Bugfix: support method call in Any() on embedded list

* adding StartsWith and EndsWith case

---------

Co-authored-by: Steve Lorello <42971704+slorello89@users.noreply.github.com>
Co-authored-by: slorello89 <steve.lorello@redis.com>
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

Successfully merging this pull request may close these issues.

None yet

2 participants