GithubHelp home page GithubHelp logo

Npgsql.PostgresException (0x80004005): 42883: function st_contains(deployment.geometry, deployment.geometry) does not exist about efcore.pg HOT 4 OPEN

flyinseal avatar flyinseal commented on June 12, 2024
Npgsql.PostgresException (0x80004005): 42883: function st_contains(deployment.geometry, deployment.geometry) does not exist

from efcore.pg.

Comments (4)

roji avatar roji commented on June 12, 2024

Can you please submit a minimal, runnable project or code sample that shows the problem happening? It's difficult to reconstruct a problem from a bunch of snippets and screenshots as above.

from efcore.pg.

flyinseal avatar flyinseal commented on June 12, 2024

Of course!

generate geometry parameter in service
image

call repository to query
image
even i use the native sql to query, but it doesn't work

DbContext
image
this extension is used in a new schema under the database named as deployment

Related Entity
image

Program.cs
image

This is all the codes related with this issue.
Besides, I have already executed below sql in database.
image
the last sql can be executed in database and cannot be executed through codes. same error like "ST_Point doesn't exist"
image

from efcore.pg.

flyinseal avatar flyinseal commented on June 12, 2024

I probably find the reason. However, I don't know how to solve it with EF core. I need to call the function under the schema "deployment". But the generated SQL doesn't include the "deployment" schema! Am I right? If so, how to specify the schema when I use the contains or within method.
I already add default schema in DbContext like below:
image

image

from efcore.pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.