My headache are starting to grow. I have stated the word distinct in the query, but this does not help and in order to get it to compile I had to erase the 'order by'-clause which is not desireable.
The query with distinct: select distinct u.guests from nu.hjemme.ejb.entity.User as u inner join fetch u.guests where u.userName = :userName Is there a way to make this query native? I tried to state it as a native query, but then it won't compile because it can't find the column named id (the primary key column in the create table statement which the EJB container has generated). Help! Does anyone have an other solution for getting a unique collection (that is a collection which contains unique beans in order of its id) which is a collection which is refrenced by another bean? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3892210#3892210 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3892210 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
