question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Class level is-accessible doesn't work

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
phil-schneidercommented, Feb 5, 2016

When will 5.5.2 oder 5.6.0 be released?

1reaction
yuranoscommented, 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));
            }

        };
Read more comments on GitHub >

github_iconTop Results From Across the Web

Enforcing Object and Field Permissions | Apex Developer Guide
Although Apex doesn't enforce object-level and field-level permissions by default, ... For example, you can call the isAccessible , isCreateable , or ...
Read more >
Dynamically enforce object and field level security?
1 · Hi Adrian, I used that code snippet, but I get the following error when trying to save the class. · Sorry,...
Read more >
Enforcing Object Level and Field Level Permissions in Apex
When it runs that query Salesforce is doing the field and object level checks on our behalf and won't return any data if...
Read more >
Dozer Mapping Class level is-accessible - java - Stack Overflow
But this does not seem to work. When I set is-accessible at field level it works fine. BeanMappingBuilder builder = new BeanMappingBuilder ...
Read more >
Enforce Object-level and Field-level permissions in Apex
Apex code is mostly run in system context so it is not considering current ... a class enforces Sharing Rules, but not object...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found