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

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


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45152#comment-45152 ] 

Dmitry Murashenkov commented on HHH-6977:
-----------------------------------------

Oh, just found out that a custom @Persister can be supplied, so better to override it as a workaround.

> 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