This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 155219 - Certain subselect queries doesn't work in the HQL Editor
Summary: Certain subselect queries doesn't work in the HQL Editor
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Hibernate (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vadiraj Deshpande
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-11 12:11 UTC by Jan Horvath
Modified: 2009-02-19 23:27 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log file (702.21 KB, text/plain)
2008-12-12 06:21 UTC, Vadiraj Deshpande
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Horvath 2008-12-11 12:11:51 UTC
I'm not able to run a query with subselect in the HQL Editor. Sakila db is used here:

from Actor as actor where actor.actorId in (select filmActor.actor.actorId from FilmActor as filmActor where filmActor.film.filmId=20)

However another query works fine:

from Actor as actor where (select count(f.film) from actor.filmActors as f) > 10
Comment 1 Vadiraj Deshpande 2008-12-12 06:19:14 UTC
Reproducible in latest build. May be this is due error in pre-processing of mapping files. Here's the exception :
org.hibernate.DuplicateMappingException: Duplicate collection role mapping sakila.Actor.filmActors
        at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124)
        at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2066)
        at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2041)
        at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:359)
        at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:273)
        at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144)
        at org.hibernate.cfg.Configuration.add(Configuration.java:669)
Comment 2 Vadiraj Deshpande 2008-12-12 06:21:17 UTC
Created attachment 74876 [details]
IDE log file
Comment 3 Vadiraj Deshpande 2008-12-12 09:47:31 UTC
Fixed:
http://hg.netbeans.org/main/rev/4b3db7cb6d4e
Comment 4 Jan Horvath 2008-12-12 12:10:40 UTC
v.
Comment 5 Vadiraj Deshpande 2008-12-13 17:24:51 UTC
Adjusting the target milestone.
Comment 6 pslechta 2008-12-16 14:19:47 UTC
The fix was ported into release65_fixes repository.

http://hg.netbeans.org/release65_fixes/rev/2765bf2480e3