1

I have a spring-boot application with JPA, and I have the following mapping class:

@Entity
public class Entry {

    @Id
    @GeneratedValue(generator = "ENTRY_SEQ")
    @SequenceGenerator(name = "ENTRY_SEQ", sequenceName = "ENTRY_SEQ")
    private Long id;

    @ManyToOne
    @JoinColumn(name = "CONSTR_TABLE_ID", nullable = false)
    private ConstraintTable constraintTable;

    @OneToMany(mappedBy = "entry", cascade = CascadeType.ALL, orphanRemoval = true)
    private List<EntryValue> entryValues = new ArrayList<>();

   // default getters and setters


   public List<EntryValue>[] createValuesGroupedByColumn() {
       return null;
   }
}

Every time I start my application it throws the following exception:

Caused by: java.lang.IllegalArgumentException: No PropertyTypeExtractor available for type void

It's caused because List<EntryValue>[] it's not a valid type supported in JavaReflectionManager.toXType, it only supports arrays, collections and simple types. However I would like to have this method and configure hibernate to ignore it.

In this post was suggested to use the @Transient annotation, but it didn't work. I tried different names that don't start with [get|set|is]AttrName (the standard bean convention) and also didn't work. Is there someway I can ignore this method from being scanned by hibernate during initialization?

João Pedro Schmitt
  • 1,046
  • 1
  • 11
  • 25

0 Answers0