public List<SubChannelList> findSubChannelList(Integer dungeonId, Integer mainChannel){ return em.createQuery( "select new com.jungguji.windbossgentimer.web.dto.channel.ChannelDTO.SubChannelList" + "(c.subChannel, k)" + " FROM Channel c left join c.killTimes k" + " WHERE c.dungeon.id = :dungeonId AND c.mainChannel = :mainChannel" + "", SubChannelList.class) .setParameter("dungeonId", dungeonId) .setParameter("mainChannel", mainChannel) .getResultList(); }
발생한 에러
1 2 3 4 5 6 7 8 9 10 11 12
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: Unable to locate class [com.jungguji.windbossgentimer.web.dto.channel.ChannelDTO.SubChannelList] [select new com.jungguji.windbossgentimer.web.dto.channel.ChannelDTO.SubChannelList(c.subChannel, k) FROM com.jungguji.windbossgentimer.domain.channel.Channel c left join c.killTimes k WHERE c.dungeon.id = :dungeonId AND c.mainChannel = :mainChannel] at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:74) at org.hibernate.hql.internal.ast.ErrorTracker.throwQueryException(ErrorTracker.java:93) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:282) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:192) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:144) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:113) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:73) at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:162) at org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:604) at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:716) ... 73 more