We are using hibernate (annotations) with DB2 9.7. We have a parent table with many child tables (a lot, and this will not be changed). When hibernate creates a select query, the select statement list gets so large that DB2 throws error code 840. This happens because hibenate creates a join with all the child tables available.
Has anyone had experience with similar problem? Thanks.
Pinned topic Db2 9.7 SP4 error code 840 with Hibernate
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-15T12:14:49Z at 2012-10-15T12:14:49Z by SystemAdmin
SystemAdmin 110000D4XK17917 Posts
Re: Db2 9.7 SP4 error code 840 with Hibernate2012-10-15T12:14:49ZThis is the accepted answer. This is the accepted answer.Hello,
You should limit the list of fields on top of the SELECT statement to the fields which will actually be used by the application :
Btw the error returned is -840 (and not 840).