You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We now support mapping CLR List<T> to PostgreSQL arrays (#392). We also have some nice operation translations for regular CLR arrays, but should also translate operations for List<T>, which is supported for mapping PostgreSQL arrays.
Feel free to work on this, at least some things should be fairly easy. As a first goal it would be good to achieve party with what is already translated for arrays (length, indexing...)
@SommerEngineering your query is very different from a simple Contains in a Where clause - can you please open a new issue?
If Competencies is a list (or array) of string, are you searching whether one of its strings contains a specific character? Posting a full code sample (including your model) could help clarify what you're trying to do.
Thanks @roji for your response. I created issue #1554 with a minimal repo to reproduce the case 🙂
@JohnDitno In my repo for issue #1554 you find different attempts to archive this functionality. No one works, if partial matching is necessary. Searching for exact matches in array columns works, though. This is might a workaround until we get the issue solved.
Activity
austindrenski commentedon May 27, 2018
@roji Has anyone started working on this?
If not, I can start scoping out what we could translate in time for 2.1.
roji commentedon May 27, 2018
Feel free to work on this, at least some things should be fairly easy. As a first goal it would be good to achieve party with what is already translated for arrays (length, indexing...)
roji commentedon Jan 1, 2020
See some work done based on the old query pipeline in #541
1 remaining item
Translate List<T> operations to PG array
Translate List<T> operations to PG array
Translate List<T> operations to PG array
Translate List<T> operations to PG array
Translate List<T> operations to PG array
Translate List<T> operations to PG array
ryanelian commentedon Feb 23, 2020
Excuse me, does this mean that:
Is now supported?
(Will it translate to:)
roji commentedon Feb 23, 2020
@ryanelian yes, that should work - it's very similar to this test. Give it a try and please open a new issue if you run into trouble.
JohnC-Ditno commentedon Oct 1, 2020
Could someone confirm whether the following partial matching using Any and Contains is supported?
roji commentedon Oct 3, 2020
@JohnDitno take a look at #395 (comment). I'd recommend trying to reference 5.0.0-rc1 and giving it a try to be sure.
SommerEngineering commentedon Oct 29, 2020
@JohnDitno Unfortunately it does not work, at least in our case:
It does not matter if
Entry.CompetenciesisList<string>orstring[]. Both fails with the shown exception.I used:
<TargetFramework>net5.0</TargetFramework><PackageReference Include="Npgsql" Version="5.0.0-preview1" /><PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.0-rc2" />@ryanelian Should I open a new issue for that?
JohnC-Ditno commentedon Oct 29, 2020
@SommerEngineering thanks for responding to my query.
That is a shame it doesn't seem to work still, hopefully it can be fixed as we have a similar scenario to your case.
roji commentedon Oct 29, 2020
@SommerEngineering your query is very different from a simple Contains in a Where clause - can you please open a new issue?
If Competencies is a list (or array) of string, are you searching whether one of its strings contains a specific character? Posting a full code sample (including your model) could help clarify what you're trying to do.
SommerEngineering commentedon Nov 2, 2020
Thanks @roji for your response. I created issue #1554 with a minimal repo to reproduce the case 🙂
@JohnDitno In my repo for issue #1554 you find different attempts to archive this functionality. No one works, if partial matching is necessary. Searching for exact matches in array columns works, though. This is might a workaround until we get the issue solved.