environment seam 2. using JTA as transaction-type
I'm using I suppose the standard seam way to access my Mysql DB using hibernate through the entity manager
I would like to access the result of a query in a more genereric way using the collumn name to get to the field parameter dynamicaly.
I would like to be able to get the FieldContent using the column name at run time
Entity Manager get field content using a parameter
Code:
FullTextEntityManager em ; em using injection
List result;
Object row;
result =em.reateQuery( sql)
.setMaxResults(pageMax + 1)
.setFirstResult(pageMax * page)
.getResultList(); ;I'm querying my DB using a generic create Query
and I would like to find my individual fields in the result as
int fieldnr=((ResultSet) row).findColomn(fieldName);
Object field=((RowSet).getObject(fieldnr) ;
....
can anyone tell me how to get to the fieldnr/ fieldName combination
starting from seam and the entity manager ?
I realize this is slower then directly handling the result using hibernate but
i woulkd accept the performance loss for the gained flexibility in this case.