I’m new to hibernation. I have to say that it really simplifies all the content of SQL queries. However, manipulating the returned results is a pain for me Headache.
The results are returned as a list. Most of the time I really want the results to be in the result set so that I can manipulate it more easily, because with the result set, you can sort by columns The name or index specifies the value. In the List, I almost have my own noobity.
In some cases, I can retrieve the list into the JSF data table, and then call the member directly. I can’t always It’s done. Don’t ask me why. @.@rotation head.
Is there a way to get the result set instead of the hibernate list?
// Code for iterating over a list of objects
for(MappedClass mappedCless: list){
String name = mappedClass.getName();
String id = mappedClass .getId();
// further logic
}
Department,
I’m new to hibernation. I have to say that it does simplify All the content of the SQL query. However, manipulating the returned results is a headache for me.
The results are returned in the form of a list. Most of the time I really want the results In the result set so that I can manipulate it more easily, because with the result set, you can specify values by column name or index. In List, I almost have my own noobity.
In some cases Next, I can retrieve the list into the JSF data table, and then call the member directly. I can’t always do this. Don’t ask me why. @.@旋头.
Is there a way to get the result set Instead of hibernate list?
Slightly old thread, but I can’t resist:
// Code for iterating over a list of objects
for(MappedClass mappedCless: list){
String name = mappedClass.getName();
String id = mappedClass.getId();
// further logic
}