collection « POJO « JPA Q&A





1. Map SQL (not JPQL) to a collection of simple Java objects?    stackoverflow.com

I can't believe I'm asking this, but... Is there any way, in Java, to execute a SQL statement (not JPQL) and map the results to a List of Plain Old Java Objects? I ...

2. Can Hibernate create plain POJO's with std java collections    forum.hibernate.org

Two main reasons (largely related to serialisation): 1) I want to be able to save them as XML files, using something like Castor, and it'd be easier to use the standard mappings 'out of the box'. 2) Ditto for serialisation in the context of a distributed cache. I know that I can overcome this issue by writing my own mappings/serializers but ...