On 02. Mär 2006 - 09:07:20, James Carman wrote: | What error messages do you get on the query method? Also, have you tried: | | new ArrayList<Person>( getSession().createCriteria( Person.class ).list() );
I've done some investigation in the meanwhile and now I know which class cast causes the exception: List<Person> list = _personDao.getPersons(); Object[] array = list.toArray(); <- works Person[] array2 = (Person[]) list.toArray(); <- ClassCastException But I don't know how to fix this... :( JFYI: The Person entity is related to other classes by use of some OneToMany and ManyToMany annotations. Perhaps this causes the problem? Sincerly, Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
