Giter VIP home page Giter VIP logo

Comments (4)

leonardoporro avatar leonardoporro commented on May 25, 2024 1

Hello @tarockx
Sorry for the long delay, I've been away from dev due to a family health issue.
You are right, anything that is not a Primitive, a Nullable or a Collection is threated like a Complex, and Complex are References in EF.
I need to write a mapper for ValueConverter, will do this weekend if I manage to have some free time.

from detached-mapper.

tarockx avatar tarockx commented on May 25, 2024

Any news on this?

from detached-mapper.

leonardoporro avatar leonardoporro commented on May 25, 2024

Totally 100% sorry! This year has been a nightmare for me.
At this point you probably don't need this anymore or just gave up the library, but thanks for the feedback.

You are right, the mapper is trying to handle Foos as a collection of entities.. but I was only able to reproduce it if Foo is an entity: i.e.: there is a DbSet Foos property in the DbContext.

Anyway I added a new annotation [Primitive]. It forces the mapper to copy objects and collections from the source to the target property without attempting to perform any mapping.

For now, it only works for the same clr type: i.e.: Foo to Foo, not FooDTO to FooEntity.
here you can see a test using it. If you remove [Primitive] from Tags property of Address object, the error you mentioned can be reproduced.

This is for > 7.1.4

Thanks again.

from detached-mapper.

tarockx avatar tarockx commented on May 25, 2024

Thanks for the update! I've tested and it seems to be working without issues, great job 👍

from detached-mapper.

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.