Closed aloksharma1 closed 4 days ago
it is SQL from not from this LNQ query. Are you sure that you have posted actual SQL?
Small comment, if you use Select
- you can totally remove AsNoTracking, EF do not track custom entities.
yes SQL is from same linq query i redacted a lot of code for simplicity. also removing NoTracking Part as you suggested.
Changing to Query from NoTracking didnt changed the random issue.
hi, dont want to rush you or anything but were you able to look into this. i still think its happening due to how Linq2DB handles Union (lazy probably) if you can tell me where to look at maybe i can try debugging it locally and see whats happening? as i said if i fetch a list of 5 rows (2-3 gets null on union field randomly).
@sdanyliv can you give me some instructions on how to debug it? i have free time from tomorrow for next 2 days, so i want to look into this issue.
Does the query have inputs? Perhaps the intermittent failure is due to differing inputs, and so I would start logging all the inputs to the query along with the generated sql text from the query, and then try to determine if there was a way to reliably reproduce the issue.
I'm closing it as we cannot reproduce it and it is probably obsolete anyways with all changes in v6 release.
its ok, i moved this logic to raw query instead havent tested this with v6.
Hello,
this is the live page to check the result of union query : click here scroll down and you will see a slider with images. images etc are selected through union using this query:
this query works ok sometimes but sometimes it just randomly skips BlogHeroes (the Union Query Part) & sends null result in it.
here is the generated query, but its missing the union query:
i tried
AsSubQuery()
but it didnt worked, do you have any workaround that will ensure union query always gets called (or whatever is happing in here can be logged?).thanks for the help