java - Passing a query to hibernate as a parameter to another query -
why isn't legal? - im new java/hibernate.
query query = session.createsqlquery("select round(count(*) * 0.25) x carecube.scheduledprocedure"); query query1 = session.createsqlquery("select scheduledprocedure.id carecube.scheduledprocedure order scheduledprocedure.id limit 1 offset :q1"); query1.setparameter("q1", query );
i want execute 1 query holds number of rows multiplied quarter..
then want execute query, , pass result parameter on second query object.
is possible open multiple query objects same session above? when try pass in query object (which should hold number of rows) parameter query1, receive following error:
"could not determine type class: org.hibernate.internal.sqlqueryimpl"
could hibernate guru shed light?
thank immensely.
Comments
Post a Comment