I am working on a Java Hibernate
project and I want to retrieve information from tables.I use XML mapping to link a table with an class(entity) as you know ,though for another table I want to retrieve only one column by native sql
without doing the unnecessary XML mapping or the annotation, like jdbc does but without adding additional .java files.
Asked
Active
Viewed 41 times
0

Phil_Charly
- 137
- 13
-
1This may help http://stackoverflow.com/questions/10652358/how-do-you-select-a-column-using-hibernate – barunsthakur Jul 04 '15 at 09:45
-
Thank you this is very helpful I missed this question, do you know if it does need mapping, I shall try it and see. – Phil_Charly Jul 04 '15 at 09:51
-
Good method,but from what I am aware you have to still create the class entity. – Phil_Charly Jul 04 '15 at 11:13