[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3036) HQL: Using "like" operator on a collection does not render the column name

Paul Benedict (JIRA) noreply at atlassian.com
Fri Dec 28 11:58:05 EST 2007


HQL: Using "like" operator on a collection does not render the column name
--------------------------------------------------------------------------

                 Key: HHH-3036
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3036
             Project: Hibernate3
          Issue Type: Bug
          Components: query-hql
    Affects Versions: 3.2.5
         Environment: MySQL 5.0.37 WIN32, Hibernate 3.2.5, Hibernate Annotations 3.3.0GA
            Reporter: Paul Benedict


Here is my class:

class Book {
    @CollectionOfElements
    @Column(name = "name", nullable = false)
    @Sort(type = NATURAL)
    public SortedSet<String> getLabels() { ...}
}

I then am looking for a wildcard match against the book labels . The HQL:
from Book b where b.labels like :bookLabel

The SQL ends up like this:
SELECT (..myriad of column names...) from Book WHERE . like ?

It outputs just a dot for the column name in the WHERE clause. Because of this, MySQL says I supplied no parameters. I don't know how to work around this, but I was expecting a table.column to be in its place.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list