Just curious about large tables
by Dennis Gesker
Hello hibernate-users:
I hope this isn't a FAQ but I am curious...
I believe a method can only have 254 parameters as indicated here:
https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.11
<https://mailtrack.io/trace/link/2e37ed64c46e377992fd12c5ebf1dd7793d7048c?...>
My guess is that a constructor has a similar limit and won't compile anyway.
So, if one had a very large table, say 1000 columns or more, would
Hibernate use the setters in the object to load/populate the members of the
JPA object? Or, would Hibernate throw an exception because of the limit on
the number parameters of the constructor?
The question came to mind as I was looking at the @ConstructorResult that
goes within @SqlResultSetMapping -- which I typically use just for come
some custom data objects returned from a namedquery. (My use cases are
typically FAR below 255 columns.)
Again, not a burning item but just wondering if the constructor in Java
could/would obstruct Hibernate in mapping a large number of columns to a
JPA object. What would the AttributeConverter do?
Cordially,
Dennis
5 years, 8 months