Hi
I'd like to write a JUnit test which executes all named queries which I've defined in my application. My named queries
are present in a few separate hibernate mapping files (sample below).
Is there a way in spring (v2.5.1 am using) perhaps of, from Java, getting a list of all named queries defined in my "hbm.xml" files ?
<sql-query name="getAllCustomer">
select name from Customer
</sql-query>
<sql-query name="getAllAccounts">
select name from Account
</sql-query>
Alternatively I could write some parsing code that would search for "<sql-query name=" in all "hbm.xml" files and extract
the name of the query but I reckon spring must have some bean to do this?
Any help would be great.
Thanks, Ro>
I'd like to write a JUnit test which executes all named queries which I've defined in my application. My named queries
are present in a few separate hibernate mapping files (sample below).
Is there a way in spring (v2.5.1 am using) perhaps of, from Java, getting a list of all named queries defined in my "hbm.xml" files ?
<sql-query name="getAllCustomer">
select name from Customer
</sql-query>
<sql-query name="getAllAccounts">
select name from Account
</sql-query>
Alternatively I could write some parsing code that would search for "<sql-query name=" in all "hbm.xml" files and extract
the name of the query but I reckon spring must have some bean to do this?
Any help would be great.
Thanks, Ro>