[hibernate-users] Just curious about large tables

Dennis Gesker dennis at gesker.com
Mon Feb 25 13:04:25 EST 2019


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?url=https%3A%2F%2Fdocs.oracle.com%2Fjavase%2Fspecs%2Fjvms%2Fse11%2Fhtml%2Fjvms-4.html%23jvms-4.11&userId=3240016&signature=940f52cff701b6f7>

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-users/attachments/20190225/aaf65691/attachment.html 


More information about the hibernate-users mailing list