-
Notifications
You must be signed in to change notification settings - Fork 59
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
support SQL arrays #653
Comments
IMO we should leave |
Ah yes, you're right. For some reason I thought that
That sounds like a recipe for unnecessary lack of portability to me. |
I mean, unless you want to actually specify what the default is. But I have no intuition as to what would be a sensible default here. |
The default could be the maximum possible size a DB allows. Since Oracle requires to specify array sizes, but other databases support just "unlimited" (within the bounds of row format limits) elements, a default to max might be nice. If Oracle users care about row size and perf (not sure if the max size affects that), they can specify a lower value. |
Wouldn't that be extremely inefficient for small arrays? |
Like I wrote, every DB other than Oracle supports unlimited size by default or doesn't even allow specifying a size limit in the column definition. To restrict the size, we'd have to emit a check constraint. |
If I use this on a raw Collection, I need something like |
Yeah, |
Both Hibernate and EclipseLink have an
@Array
annotation for mapping Java arrays to SQLarray
types.I therefore think we should add the following annotation to JPA:
You could use it like this:
The text was updated successfully, but these errors were encountered: