views:

53

answers:

2

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.

A: 

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.

Frank Heikens
Thanks Frank Heikens.It is not about the number of columns in a single database table. But when we join multiple columns (by createCriteria in hibernate) we are getting this error.
Vineyard
Hmmm, I see, now I get it. Can't help you there, we never had this problem, never had so much columns in our queries.
Frank Heikens
A: 

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).

Pascal Thivent