do you have to add a native query to an entity as follows and how do you do update inserts and deletes in native quesries in hibernate
Query query = session.createSQLQuery(sql).addScalar("stdErr",Hibernate.DOUBLE).
addScalar("mean",Hibernate.DOUBLE);
//Double [] amount = (Double []) query.uniqueResult();
Object [] amount = (Object []) query.uniqueResult();
System.out.println("mean amount: " + amount[0]);
System.out.println("stdErr amount: " + amount[1])
List insurance = session.createSQLQuery("select {ins.*} from insurance ins")
.addEntity("ins", Insurance.class)
.list();
|