Title: Key not found in dictionary on multiple booleans in where · Issue #2 · hisabir/lambda-sql-builder · GitHub
Open Graph Title: Key not found in dictionary on multiple booleans in where · Issue #2 · hisabir/lambda-sql-builder
X Title: Key not found in dictionary on multiple booleans in where · Issue #2 · hisabir/lambda-sql-builder
Description: First of all, great job on this, I was actually doing it myself as well, but ended up getting extremely messy and did not get as far as you did, ended up scrapping it and using this. Only issue I am having is the following query: query.W...
Open Graph Description: First of all, great job on this, I was actually doing it myself as well, but ended up getting extremely messy and did not get as far as you did, ended up scrapping it and using this. Only issue I a...
X Description: First of all, great job on this, I was actually doing it myself as well, but ended up getting extremely messy and did not get as far as you did, ended up scrapping it and using this. Only issue I a...
Opengraph URL: https://github.com/hisabir/lambda-sql-builder/issues/2
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Key not found in dictionary on multiple booleans in where","articleBody":"```\nFirst of all, great job on this, I was actually doing it myself as well, but \nended up getting extremely messy and did not get as far as you did, ended up \nscrapping it and using this.\n\nOnly issue I am having is the following query:\n\nquery.Where(x =\u003e (x.IsActive || x.IsLocked) \u0026\u0026 x.EmailAddress == \n\"test@test.com\");\n\nIs giving the following error:\n\nSystem.Collections.Generic.KeyNotFoundException : The given key was not present \nin the dictionary.\n\nat System.Collections.Generic.Dictionary`2.get_Item(TKey key)\n at Resolver.LambdaResolver.BuildSql(MemberNode leftMember, MemberNode rightMember, ExpressionType op) in LambdaResolverTree.cs: line 80\n at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4\u003cT0,T1,T2,T3\u003e(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)\n at Resolver.LambdaResolver.BuildSql(OperationNode node) in LambdaResolverTree.cs: line 46\n at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2\u003cT0,T1\u003e(CallSite site, T0 arg0, T1 arg1)\n at Resolver.LambdaResolver.BuildSql(Node leftNode, Node rightNode, ExpressionType op) in LambdaResolverTree.cs: line 99\n at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4\u003cT0,T1,T2,T3\u003e(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)\n at Resolver.LambdaResolver.BuildSql(OperationNode node) in LambdaResolverTree.cs: line 46\n at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2\u003cT0,T1\u003e(CallSite site, T0 arg0, T1 arg1)\n at Resolver.LambdaResolver.ResolveQuery(Expression`1 expression) in LambdaResolverQuery.cs: line 18\n at LambdaSqlBuilder.SqlLam`1.And(Expression`1 expression) in SqlLam.cs: line 47\n at LambdaSqlBuilder.SqlLam`1.Where(Expression`1 expression) in SqlLam.cs: line 41\n at Tests.ExpressionTests.WhereMultipleBoolAndElse_Should_ReturnQuery() in ExpressionTests.cs: line 364\n\n\nThe only workaround I was able to do is add \"== true\" to both booleans, however \nif I only did 1 boolean, it works fine\n\nExample..\nquery.Where(x =\u003e (x.IsActive || x.CreatedOn == date) \u0026\u0026 x.EmailAddress == \n\"test@test.com\");\n\nThis one works without issue\n```\n\nOriginal issue reported on code.google.com by `lee...@leehull.com` on 14 Feb 2014 at 2:09\n","author":{"url":"https://github.com/GoogleCodeExporter","@type":"Person","name":"GoogleCodeExporter"},"datePublished":"2016-01-13T12:37:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2/lambda-sql-builder/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f32bcfbb-e35b-5703-1dcd-1c30a9363dc5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A322:81674:698F2:8E26E:698F6A76 |
| html-safe-nonce | e4c54ae46d05dab9beeba6f38c33a73eea23572f444fd43231fcfae95159a3d7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzIyOjgxNjc0OjY5OEYyOjhFMjZFOjY5OEY2QTc2IiwidmlzaXRvcl9pZCI6IjY5MDkyODAxMTUyMjMzOTA4MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f0019eb0a36cc7f6efa9fd48b5b100886545175e0cca3dfca05590517bd0423f |
| hovercard-subject-tag | issue:126409691 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/hisabir/lambda-sql-builder/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6255dba64002d37ae47fca16a34cf4993e9c3b8693cc6fda437c09f7fdf9bd14/hisabir/lambda-sql-builder/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6255dba64002d37ae47fca16a34cf4993e9c3b8693cc6fda437c09f7fdf9bd14/hisabir/lambda-sql-builder/issues/2 |
| og:image:alt | First of all, great job on this, I was actually doing it myself as well, but ended up getting extremely messy and did not get as far as you did, ended up scrapping it and using this. Only issue I a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GoogleCodeExporter |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7ab1c9acb90dba91d5e994ebfb6bfb1130e0e0e6aca329cdbbd934d636e22ab6 |
| turbo-cache-control | no-preview |
| go-import | github.com/hisabir/lambda-sql-builder git https://github.com/hisabir/lambda-sql-builder.git |
| octolytics-dimension-user_id | 3982673 |
| octolytics-dimension-user_login | hisabir |
| octolytics-dimension-repository_id | 49572810 |
| octolytics-dimension-repository_nwo | hisabir/lambda-sql-builder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49572810 |
| octolytics-dimension-repository_network_root_nwo | hisabir/lambda-sql-builder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d6695367a1b2f05addc4030b791720f01693df4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width