You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described here: https://eclipse.dev/eclipselink/documentation/2.4/jpa/extensions/a_array.htm
you can use the @array annotation on a array column but only in combination with adding the @struct annotation on the class level. One thing is that this feels a bit odd, since it is a normal DB table rather than a Struct type.
But what bothers me a bit more is the fact that the @struct annoation has a mandatory property name.
And it seems I can give an arbitrary value for it and it works.
But can this be intended?
I think it can be confusing and therefore I think it is a bug.
To Reproduce
Here an Example:
DB Table with Array column:
CREATE TABLE my_table (
id bigserial NOT NULL,
job_title varchar NULL,
list_of_names varchar(50) ARRAY[5] NULL
);
What the above demnonstrates that the Struct annotation requires a mandatory name and one can give a random value. In this case "SomeRandomValue".
Without the @struct annotation it fails during runtime with "[EclipseLink-157] " error
Expected behavior
I think the @struct annotation shouldn't be required at all.
But if it required there should be some common understanding what a suitable value for the name attribute is.
The text was updated successfully, but these errors were encountered:
Describe the bug
As described here: https://eclipse.dev/eclipselink/documentation/2.4/jpa/extensions/a_array.htm
you can use the @array annotation on a array column but only in combination with adding the @struct annotation on the class level. One thing is that this feels a bit odd, since it is a normal DB table rather than a Struct type.
But what bothers me a bit more is the fact that the @struct annoation has a mandatory property name.
And it seems I can give an arbitrary value for it and it works.
But can this be intended?
I think it can be confusing and therefore I think it is a bug.
To Reproduce
Here an Example:
DB Table with Array column:
Corresponding java JPA class:
What the above demnonstrates that the Struct annotation requires a mandatory name and one can give a random value. In this case "SomeRandomValue".
Without the @struct annotation it fails during runtime with "[EclipseLink-157] " error
Expected behavior
I think the @struct annotation shouldn't be required at all.
But if it required there should be some common understanding what a suitable value for the name attribute is.
The text was updated successfully, but these errors were encountered: