GithubHelp home page GithubHelp logo

Comments (8)

TPucke avatar TPucke commented on August 20, 2024 1

Would it be appropriate for ValueGeneratedOnAddOrUpdate() to throw a NotImplementedException? I spent a fair amount of time today to discover that this adds nothing.

Using v 2.2.4

from efcore.pg.

roji avatar roji commented on August 20, 2024 1

@TPucke @austindrenski EF Core 3.0.0 actually added support for the upcoming PostgreSQL 12 generated columns, so this will start working (see these docs). We previously had a clear doc note saying that this feature wasn't available on PostgreSQL.

from efcore.pg.

roji avatar roji commented on August 20, 2024

From @101shipit on November 22, 2015 1:33

Same for defining a property as ValueGeneratedOnAdd

from efcore.pg.

roji avatar roji commented on August 20, 2024

@101ship-it I don't think ValueGeneratedOnAdd is the same as ValueGeneratedOnAddOrUpdate, the former is natively/easily supported in PostgreSQL, e.g. by defining a default value for a column... Or am I missing something?

from efcore.pg.

roji avatar roji commented on August 20, 2024

From @101shipit on December 1, 2015 19:57

agreed - they can be done differently - i was just meaning that ValueGeneratedOnAdd also doesn't work yet.

from efcore.pg.

roji avatar roji commented on August 20, 2024

Note that this is not the same as #19, which is about xmin as a special case (for concurrency token).

from efcore.pg.

roji avatar roji commented on August 20, 2024

This is probably out of scope of an EF Core provider.

Users can still use raw SQL in migrations to set up triggers which can implement ValueGeneratedOnAddOrUpdate.

from efcore.pg.

austindrenski avatar austindrenski commented on August 20, 2024

@TPucke At this point, probably not... That would very likely break code in the wild, which wouldn't be great from a patch release.

Emitting a warning sounds more plausible, but I'd need to take another look at the 2.2 architecture. Could you open a new issue with some sample user code showing when/where you expect the warning/exception to happen?

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.