in addition to jaikiran if you need a subset of attributes of an persistent 
entity you can use an non persistent class by giving the full qualified class 
name and lsit all parameters for that constructor (see spec page 100 for more 
details).
The spec says
anonymous wrote : 
  | A constructor may be used in the SELECT list to return one or more Java 
instances. The specified class
  | is not required to be an entity or to be mapped to the database. The 
constructor name must be fully qualified.
  | SELECT Clause Enterprise JavaBeans 3.0, Final Release Query Language
  | 101 5/2/06
  | Sun Microsystems, Inc.
  | If an entity class name is specified in the SELECT NEW clause, the 
resulting entity instances are in the
  | new state.
  | SELECT NEW com.acme.example.CustomerDetails(c.id, c.status, o.count)
  | FROM Customer c JOIN c.orders o
  | WHERE o.count > 100
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189290#4189290

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189290
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to