Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: engine
    • Labels:
      None
    • Last commented by a user?:
      true

      Description

      I see more and more projects start using code generators for their entities. Here are some libraries which generate java code:

      1. Immutables
      2. AutoValue
      3. FreeBuilder

      They all seem to adopt direct name accessors instead of getters (from Java Beans):

      Example

      public interface Entity {
          @NotBlank
          String name();
          // instead of getName();
      
          @Min(16)
          int age();
          // instead of getAge();
      }
      

      It seems that hibernate validator still requires POJOs to follow java bean convention. Having standard getName() / getAge() works just fine.

      Is it currently possible to plug custom method name resolution with Validator ?

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: