[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6977) Extra lazy collection size query invalid postgresql syntax

Dmitry Murashenkov (JIRA) noreply at atlassian.com
Tue Jan 17 08:08:09 EST 2012


Extra lazy collection size query invalid postgresql syntax 
-----------------------------------------------------------

                 Key: HHH-6977
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6977
             Project: Hibernate ORM
          Issue Type: Bug
          Components: core
    Affects Versions: 3.6.0
         Environment: PostgreSQL 9.1
            Reporter: Dmitry Murashenkov


Attempt to use extra-lazy collections with PostgreSQL ends with invalid syntax exception:

ERROR:  subquery in FROM must have an alias

The cause is that AbstractCollectionPersister.generateSelectSizeString fills sqlSelectSizeString query via SimpleSelect.toStatementString and it doesn't add an alias to query. Workaround is to append some alias in Dialect.appendLockHint, but not sure if it doesn't break other functionality.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list