Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA setMaxResults()

 
Fabian Angy
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I would like to know if it's possible to remove the alias created in the query by the method "setMaxResults()" (on a Query object)? (It adds a number after each column name, because of this, I have an exception ORA-00972: identifier is too long).

Examples:

Without setMaxResults()


With setMaxResults()



Thanks in advance!
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What JPA provider and version are you using?

This issue was fixed in the later EclipseLink versions I believe.

Otherwise there is an API on the DatabasePlatform setShouldUseRownumFiltering(false) that will avoid this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic