Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hibernate generates SQL statements with differing system-generated table aliases

CobertMar 27 2017 — edited Mar 31 2017

Hi,

We use Hibernate extensively in our code. Something that has cropped up recently is that where changes in the domain model mean that the SQL ID of the statement changes (since it is generated with the aliases before returning the resultset to Oracle).

This means a statement like

select a, b, c

from taba

Gets submitted to Oracle as

select a as batch1, b as batch2, c as batch3

from taba

but after a change in the domain model can become:

select a as batch11, b as batch22, c as batch33

from taba

This can be a real pain when it comes to plan stability / or if you're using profiles or SPM. Has anybody seen similar or is anybody familiar with a work around from the hibernate side?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 28 2017
Added on Mar 27 2017
9 comments
979 views