the value returned by getAttributeMethod().getDefaultValue() is an instance of Annotation, so we need to convert it in a DynaicAnnotationUsage.
When the default value is a multi value
JoinColumn[] joinColumns() default {};
the value returned by getAttributeMethod().getDefaultValue() is an array but we later try to acces it as a list,
List<E> AttributeUsage#getList(String name);
it seems Arrays.asList( defaultValue ) is not the correct way to convert array default values to a list, it causes an UnsupportException when trying to add a new element to the list.
in case of
the value returned by
getAttributeMethod().getDefaultValue()
is an instance ofAnnotation
, so we need to convert it in a DynaicAnnotationUsage.When the default value is a multi value
the value returned by
getAttributeMethod().getDefaultValue()
is an array but we later try to acces it as a list,List<E> AttributeUsage#getList(String name);