Comments (4)
I think the translation is correct. it all based on Oper precedence I think. Try duplicating last part with OR:
... ... && (x.Expires < MyApp.UtcNow || x.Expires < MyApp.UtcNow)
see if parenthesis appear
from vita.
Not sure if this is what you are looking for, but the result is still not right to me.
var query = context
.GetSession()
.EntitySet<IAuthSession>()
.Where(x => (x.Id == authSession.Id) || (x.IdentityId == authSession.IdentityId && (x.Expires < MyApp.UtcNow || x.Expires < MyApp.UtcNow)));
context.GetSession().ExecuteDelete<IAuthSession>(query);
DELETE FROM "vrewards_dev1"."AuthSession"
WHERE "Id" = @p0 OR "IdentityId" = @p1 AND ("Expires" < @p2 OR "Expires" < @p3);
-- Parameters: @p0='01H4JFPQRE725391TX95EZ577X', @p1='$01H4GA9VFWMRXEBW699XSZVKZR', @p2=[2023-07-05T07:38:33], @p3=[2023-07-05T07:38:33]
-- Time 3.5525 ms, [2023/07/05 07:38:33]
from vita.
then I am puzzled, what is wrong with the result for you? Remember that "=" is operation too, and it has the highest precedence value. AND has higher precedence than OR; so SQL is equivalent to source expression even without parenthesis
from vita.
Ahhh...I didn't aware of the operator precedence...sorry about that.....
Thank you so much for the clarification, and sorry again for the confusion.
from vita.
Related Issues (20)
- ViewHelper.EntitySet HOT 21
- GUID with Auto HOT 1
- DB Function Error HOT 2
- Left outer join view on multiple columns HOT 7
- Allow reference entity without creating foreign key constraint in table HOT 5
- Session schedule insert or update HOT 4
- DBFunction error HOT 3
- View does not group by datetime date HOT 3
- Functions like createdOn.Date are ignored in GroupBy HOT 6
- 3.6 not working correctly HOT 6
- System.NullReferenceException: Object reference not set to an instance of an object. HOT 3
- Operation Triggers HOT 34
- Execute Stored Procedures using Vita,
- There is already an open DataReader associated with this Connection which must be closed first. HOT 4
- Version 3.7 is pushed HOT 3
- Plan to restructure the source solution, trim some fat, remove Web projects and old modules HOT 4
- Check property is modified HOT 2
- Anybody using QueryFilter ? HOT 2
- Date Types PostGres SQL HOT 34
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vita.