We are using hibernate, postgres 8.3x
Our entities are many to one mapped with eager fetching. We have multiple associations with Many to one mapping.
As we added new columns to any other existing entities, We are getting below error:
target lists can have at most 1664 entries
I searched internet and they say this is due to More number of select statements in sql query (generated by hibernate)
Can you any body please let us know if there is any configuration (in postgres) to update max number columns in configuration or any other solution to solve this issue.
Thank you in advance.
Sometimes this happen when there are too much @ManyToOne(fetch=FetchType.EAGER) in the project. So, when is not necessary the FetchType.EAGER, put @ManyToOne(fetch=FetchType.LAZY)
This help me, try!
This is the max number of columns in PostgreSQL, that's correct. But why do you need even more columns? Just do some normalization and your problem is gone. Or don't use a relational database at all, you will always hit the max number of columns when you don't normalize.
There is definitely something wrong with your model/mappings/query. The right way to fix that is to work on your model/mappings/query, not on the max number of columns in PostgreSQL (I don't even get how you reached it, a query that retrieve 1664+ columns doesn't make any sense).
Try
<property name="hibernate.max_fetch_depth" value="25"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With