daniel jarrett [http://community.jboss.org/people/DoubleDenim] created the 
discussion

"native queries with non-persisted values"

To view the discussion, visit: http://community.jboss.org/message/578781#578781

--------------------------------------------------------------
Hi There,

I am using the following to pull back a list of results and I am pushing the 
results into my Location class. This all works perfectly.



 
Query q = em.createNativeQuery("call 
mydb.FindLocationsByCoords("+lat+","+lng+","+radius+")", Location.class);
 
 
List<Location> results = q.getResultList(); //from a resultset
 
 



Now I would like to add a property to the Location class for a value which 
isn't persisted but is returned by my stored proc. This value is "distance", 
and it represents a calculation in km's that the Location record is from the 
coordinates entered. 

Can anyone please point me in the right direction as to how I might go about 
this?

Thanks
DD
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/578781#578781]

Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to