Hi,
Go into your log and paste in the error.
eve
Date: Sun, 19 Aug 2007 19:48:44 +0200From: minanov_at_gmail.comTo: persistence_at_glassfish.dev.java.netSubject: Getting ejb ql query resultsetHi,This is an example in which I am tring so expolain my problem.What i want to do is take only some of the fields fromquery, not the entire object (List of objects), because my table is very beig and it has many foreign keys to other tables and if I take the all table it takes a lot of memmory and the query is very slow.But whenever I try to take the resut I get a casting errorHow can I get a reult set like with standard java EntityManager em = Menu.emf.createEntityManager(); String query_string = "SELECT" + "t.column_1" + " t.column_2" + "FROM " + " Table t "; Query query = em.createQuery(query_string); List<TableClass> results = (List<TableClass>)query.getResultList() //This is where the problem occurs -- minance
_________________________________________________________________
Try Live.com - your fast, personalised homepage with all the things you care about in one place.
http://www.live.com/?mkt=en-gb