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

Enum is being mapped with private member variable that cannot be ignored #118

Closed
mattdandrea opened this Issue Sep 20, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@mattdandrea

mattdandrea commented Sep 20, 2016

I cannot seem to ignore the private "description" field from showing up in the generated Selma mapping class.
And, it is trying to access it like it's public for some reason:

   switch (in) {
        case ONE :  {
        ...
          break;
        }
        case TWO :  {
        ...
          break;
        }
        case THREE :  {
        ...
          break;
        }
        case description :  {
        ...
          break;
        }
      }

Any ideas?

Here is the enum (it matches for both the source and destination):

public enum NumberEnum {
    ONE("one"),
    TWO("two"),
    THREE("three");

    private String description;

    private NumberEnum(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }
}
@slemesle

This comment has been minimized.

Show comment
Hide comment
@slemesle

slemesle Sep 20, 2016

Hi it looks like a bug, Selma should definitely ignore this kind of members.
I'll have a deeper look on this quickly.
Thanks for the report.

slemesle commented Sep 20, 2016

Hi it looks like a bug, Selma should definitely ignore this kind of members.
I'll have a deeper look on this quickly.
Thanks for the report.

@slemesle slemesle added the bug label Sep 20, 2016

@slemesle slemesle added this to the 1.0 Final milestone Sep 20, 2016

@mattdandrea

This comment has been minimized.

Show comment
Hide comment
@mattdandrea

mattdandrea Sep 22, 2016

Thanks for fixing this! Will this only be available in the 1.0 release or before as well?

mattdandrea commented Sep 22, 2016

Thanks for fixing this! Will this only be available in the 1.0 release or before as well?

@slemesle slemesle closed this Oct 5, 2016

@slemesle

This comment has been minimized.

Show comment
Hide comment
@slemesle

slemesle Oct 5, 2016

Winter and 1.0 is coming :)

slemesle commented Oct 5, 2016

Winter and 1.0 is coming :)

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