Giter Site home page Giter Site logo

Comments (7)

hohwille avatar hohwille commented on August 18, 2024

Any updates? Is Orika buggy and dead?

from orika.

elaatifi avatar elaatifi commented on August 18, 2024

It's not dead but time is a limited resource sorry if you're issue got ignored but you can also try the pull request, it's more helpful than the last comment :)

from orika.

sesslinger avatar sesslinger commented on August 18, 2024

I finally figured out, why Orika refused to map all fields in our test-case. Per default Orika only maps the fields declared in the target class (B.class). Fields declared in a class, which is implementing or extending B.class are being ignored. In order to change this behaviour you need to add favorExtension(true), e.g. mapper.classMap(A.class, B.class).favorExtension(true).byDefault().register().

I am still trying to find out, why Orika refuses to use the custom mapper, when PersistenceEntity.class is used in our test-case.

from orika.

ndr-brt avatar ndr-brt commented on August 18, 2024

@hohwille the link is not available anymore.
the issue is still valid?

from orika.

jndietz avatar jndietz commented on August 18, 2024

I think this is still an issue.

@Component
class MatrixAccountDataMapper {

    def configure(MapperFactory mapperFactory) {
        mapperFactory.classMap(MatrixAccountLookup.class, PlanTradeConfirm.class)
            .byDefault()
            .register()
    }
}

Exception thrown when calling mapperFacade.map()...

java.lang.IllegalAccessError: tried to access class sun.misc.Launcher$AppClassLoader from class sun.misc.Orika_AppClassLoader_AppClassLoader_Mapper37836166146992$4

from orika.

jndietz avatar jndietz commented on August 18, 2024

After removing byDefault() and adding in explicit field() methods/builders, it works as expected.

from orika.

jndietz avatar jndietz commented on August 18, 2024

Adding exclude("metaClass") and byDefault() works. Was shown by a coworker, but not sure exactly why that fixes it. I am mapping between two JPA entities in my example. Additionally, these are Groovy classes, so that probably has something to do with it.

from orika.

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.