]
Emmanuel Bernard moved EJB-345 to HHH-3198:
-------------------------------------------
Affects Version/s: (was: 3.3.2.GA)
3.2.6
Component/s: (was: EntityManager)
query-hql
Key: HHH-3198 (was: EJB-345)
Project: Hibernate3 (was: Hibernate Entity Manager)
compound primary/foreign key problems with nulls and NamedQuery
parsing
-----------------------------------------------------------------------
Key: HHH-3198
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3198
Project: Hibernate3
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.6
Environment: Hibernate core 3.2.6.ga, Hibernate EntityManager 3.3.2.GA, Hibernate
Validator 3.0.0.GA, Hibernate Annotations 3.3.1.GA
MySQL 5.0.45 / driver jar mysql-connector-java-3.1.12-bin
Reporter: Reid Hartenbower
Attachments: test-src.zip
Hi. I have Item, Container, and Specification entities that subclass NamedThing.
NamedThing uses a compound primary key which is a two-long representation of a UUID. Item
has a @ManyToOne with Container and Specification, and Specification has a
<String,String> properties map.
Two problems, first:
queries like "select distinct object(i) from Item i where
i.specification.properties[:key] = :value" produce parse errors (these are the
commented-out NamedQueries in Item); the complaint is '.' character after
specification
queries like "select distinct object(i) from Item i, Specification s where
i.container is null and i.specification = s and s.properties[:key] is null" in
TestItem.java:61 do parse successfully but produce the exception whose stack trace is in
TestItemStackTrace.txt. The hibernate sql is in hibernate-sql-output.txt; the complaint
is 'java.sql.SQLException: Operand should contain 1 column(s)'
Thanks,
Reid
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: