Hello,

I'm frustrated by the fact that I need to define @NamedQuery and others
inside my entity classes. I would like to put what I consider "logic" where
I think it's appropriate which is often not with the model. Is there a way
to programmatically define Named Queries Sql Result Set Mappings, etc and
register them with the persistence engine? I.e. is there any alternative to
using annotations/xml for defining these things?

String query = "select o...";
NamedQuery nq = new NamedQuery(query);
Persistence.registerNamedQuery(nq);

Thanks.

-- 
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com

Reply via email to