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
Array Type Mapping not working #1510
Comments
Hi all, Best Regards, |
@julian-dimitroff can you please confirm what version of EF are you using (3.1 or 5.0)? 5.0 significantly improved support for List (see #395) so there's a good change it would just work with 5.0.0-rc1. Enumerable types in general aren't supported by design, since they cause multiple enumeration which can potentially be very bad for perf. |
Hello, BR, |
@julian-dimitroff you can install 5.0.0-rc1 right now with the nuget package manager - you may need to tell it to get prerelease versoins as well (a simple checkbox). It's important for us to get confirmation ASAP, since if there's a bug I'd like to fix it for the 5.0.0 release which is quite close now. |
@roji yes it produces a query but it is a bit different. As no expert in postgresql I'll paste here the query that was produced when the entity has type SELECT z.z_index AS "Zone", d.d_index AS "Deck", (
SELECT AVG(t.value)
FROM tags_current_data AS t
INNER JOIN tags_settings AS t0 ON t.tag_id = t0.id
INNER JOIN systems_devices AS s ON t0.device_id = s.id
INNER JOIN systems AS s0 ON s.system_id = s0.id
WHERE ((t0.tag_type_id = 171) AND (s0.id = z.id)) AND (s.control_area @> ARRAY[d.id]::bigint[])) AS "Value"
FROM zones AS z
CROSS JOIN decks AS d The query works as expected when applied on the database server. BR, |
Great, thanks for confirming. The new query uses array containment syntax because that allows for index use - if control_area has an index, the query will run much faster than with ANY. See #1372 for more details. |
Hi guys,
I have a strange problem, maybe it is something that I'm missing out, but I have the following LINQ Lambda query:
According to this article, this should be translated to this:
But somehow, the translated query is like this:
The difference is where it should be
d.id = ANY(s.control_area)
it isTRUE = FALSE
Can anyone tell me what am I doing wrong?
Thanks in advance,
Julian Dimitrov
The text was updated successfully, but these errors were encountered: