[hibernate-issues] [JIRA] (HHH-14089) Physical sequence information not fetched correctly when using pooled optimizer

Darko Pejchinov (JIRA) jira at hibernate.atlassian.net
Sat Jun 27 11:39:50 EDT 2020


Darko Pejchinov ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ef73cb87e95e80a812f4080 ) *updated* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYmM0NjQ4ZWM4ZjQyNGMyOTk3OGUxYmVkNTIyYmQ3NTQiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14089?atlOrigin=eyJpIjoiYmM0NjQ4ZWM4ZjQyNGMyOTk3OGUxYmVkNTIyYmQ3NTQiLCJwIjoiaiJ9 ) HHH-14089 ( https://hibernate.atlassian.net/browse/HHH-14089?atlOrigin=eyJpIjoiYmM0NjQ4ZWM4ZjQyNGMyOTk3OGUxYmVkNTIyYmQ3NTQiLCJwIjoiaiJ9 ) Physical sequence information not fetched correctly when using pooled optimizer ( https://hibernate.atlassian.net/browse/HHH-14089?atlOrigin=eyJpIjoiYmM0NjQ4ZWM4ZjQyNGMyOTk3OGUxYmVkNTIyYmQ3NTQiLCJwIjoiaiJ9 )

Change By: Darko Pejchinov ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ef73cb87e95e80a812f4080 )

When using a pooled sequence optimizer, although the sequences in the DB have correct increment size, the SequenceStyleGenerator throws a MappingException

{quote}The increment size of the \[s_test \ ] sequence is set to \[1000 \ ] in the entity mapping while the associated database sequence increment size is \[1 \ ].{quote}

The problem was root caused in the Oracle dialect (all dialects are affected), more specifically the problem is caused by the fact that no schema column name is returned by this method
{{org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorOracleDatabaseImpl.sequenceSchemaColumn()}}
We have multiple schemas on the same database (that contain sequences that have same names, however different increment steps).
Considering that the QualifiedSequenceName _QualifiedSequenceName_ in the sequence information list returned by the {{org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(ExtractionContext)}} is composed from catalog name, schema name and sequence name and the fact that both the schema name and the catalog name will be always null, hibernate has no way to identify the correct sequence for the list of fetched sequences (if multiple schemas contain the same sequence name - as in our case).

( https://hibernate.atlassian.net/browse/HHH-14089#add-comment?atlOrigin=eyJpIjoiYmM0NjQ4ZWM4ZjQyNGMyOTk3OGUxYmVkNTIyYmQ3NTQiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14089#add-comment?atlOrigin=eyJpIjoiYmM0NjQ4ZWM4ZjQyNGMyOTk3OGUxYmVkNTIyYmQ3NTQiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100130- sha1:d095cd6 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200627/2902140a/attachment-0001.html 


More information about the hibernate-issues mailing list