Coder Social home page Coder Social logo

Comments (5)

CaspianCanuck avatar CaspianCanuck commented on August 20, 2024

Looking deeper in the NPoco code I can see that it has something to do with TypeDefinition.ExplicitColumns being set to true in FluentMappingConfiguration.CreateMappings().

Then in the FluentMappingsPocoData constructor the code skips checking a property's IgnoreColumn flag is the ExplicitColumns is true.

I am having a hard time figuring out the logic behind this. As far as I am concerned, if a column is flagged as ignored then it should be truly ignored when SQL is built.

from npoco.

CaspianCanuck avatar CaspianCanuck commented on August 20, 2024

I got it! I need to pass false into the second optional parameter of Columns() in my InvoiceHeaderMap's constructor.

Adam, you might wanna clarify this fine point in your wiki to help other devs avoid a similar confusion.

from npoco.

schotime avatar schotime commented on August 20, 2024

Hey,
I'm trying to digest all of this.
Let me have a look and I'll get back to you. Could you summarize what you have found and what you think could be changed etc, so we have a plan of attach so to speak.
Cheers,
Adam

from npoco.

CaspianCanuck avatar CaspianCanuck commented on August 20, 2024

No need to change anything in the code itself, perhaps just make a point of explaining the importance of the explicitColumns argument in the wiki. Currently it's not even mentioned anywhere in your wiki example, so it's easy to overlook.

Thanks for your quick response!

from npoco.

schotime avatar schotime commented on August 20, 2024

2.2.45 has fixed the Ignore. It was not working when using the FluentMappings. It will always look at the ignore now.
Thanks!

from npoco.

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.