Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class level is-accessible doesn't work #23

Closed
ashlineldridge opened this issue Nov 9, 2012 · 9 comments
Closed

Class level is-accessible doesn't work #23

ashlineldridge opened this issue Nov 9, 2012 · 9 comments
Milestone

Comments

@ashlineldridge
Copy link

It's my understanding that when the is-accessible="true" settings is applied at the class level this should result in private fields (without getters / setters) being mapped.

For example, the following mapping...

<mapping>
        <class-a is-accessible="true">com.example.Foo</class-a>
        <class-b is-accessible="true">com.example.FooDTO</class-b>
</mapping>

...should result in the private fields of Foo being mapped to FooDTO and visa versa. But the above does not work with Dozer 5.3.2.

However, when the individual fields of Foo and FooDTO are specified and is-accessible="true" is applied at the field-level the private fields are mapped correctly.

Please correct me if my understanding of how is-accessible="true" when applied at the class level is incorrect.

@buzdin
Copy link
Member

buzdin commented Nov 15, 2012

Your understanding is quite logical indeed. I think what happens is that making fields accessible does not alter Dozer automatic field matching algorithm, which is based on properties. So it is a bug, or rather missing feature.

@tjaronen
Copy link

tjaronen commented Jan 3, 2013

I would consider this as a bug, since in xsd it's said that it would work:
http://stackoverflow.com/questions/12370339/is-it-possible-to-configure-dozer-such-that-by-default-fields-are-rather-accesse

@katoquro
Copy link

Please let me know if it is possible to make "is-accessible" as global rule for all mapping operations

@daltonjc
Copy link

I'd like to +1 this issue, and would love to see it fixed soon. With this bug in place, it's rather impractical to map beans that have no setters; we'd have to spell out each field so we can set accessible=true on the fields, including all those fields whose names match and could otherwise be auto-detected. Obviously having to list out all the fields, as strings, is completely undesirable and makes this fairly clunky. Thank you.

@matthiasbalke
Copy link

+1

@pribic
Copy link

pribic commented Jan 9, 2014

Hi guys,
I am really interested in this project and would like to contribute.
sorry i am sending mail to this channel, but i dont know whom to contact
for this .

Please let me know how can I contribute.

My qualification:

B.Tech in computer engineering.
Having around 2.5 years of work exp.

Currently working in Amazon as a software developer engineer.

Thanks,
Priyank.

Thanks,
Priyank.

On Thu, Jan 9, 2014 at 4:05 PM, Matthias Balke notifications@github.comwrote:

+1


Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-31918867
.

@pribic
Copy link

pribic commented Feb 22, 2014

priyank doshi sent you an invitation

Twitter helps you stay connected with what's happening right now and with the people and organizations you care about.

Accept invitation

https://twitter.com/i/5f3c733c-53b2-4772-ad96-a83ec9f0b1fe

This message was sent by Twitter on behalf of Twitter users who entered your email address to invite you to Twitter.
Unsubscribe: https://twitter.com/i/o?t=1&iid=dd05b6b1c0fc478380934179cdbae3f9&uid=0&c=IuVwbCB3dgHmhh5nCmolCBwYS7%2FWWpiy4kblJkuLEyS7PaFAF0WuqtKO5pMLbkSFAFYm%2B9AUITSIRLTtxdVINtS7vYeKMbe6KDaPc4zKcaGGPjhNqw6cTg%3D%3D&nid=9+26

Need help?
https://support.twitter.com

@phil-schneider
Copy link

When will 5.5.2 oder 5.6.0 be released?

@yuranos
Copy link

yuranos commented Apr 13, 2017

@lauriharpf, will this fix work with API as well? I'm really keen on using something like:

return new BeanMappingBuilder() {
            @Override
            protected void configure() {
                mapping(type(typeA).accessible(true), type(typeB).accessible(true));
            }

        };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants