Hi,
I'm having a "no persistent classes found" error and this error not always occur.
I have the following mapping:
<class name="DemographicAssociation" table="demographic_association">
<composite-id name="demographicAssociationPK"
class="top.demography.core.DemographicAssociationPK" >
<key-property name="demographicGroupId"
column="demographic_group_id" type="java.lang.Integer" />
<key-property name="userId" column="user_id" type="java.lang.Integer" />
</composite-id>
</class>
In a test class i'm doing the next query:
....
Query query = session.createQuery ( "select b.demographicAssociationPK.demographicGroupId from top.spectaris.demography.core.DemographicAssociation as b where b.demographicAssociationPK.userserId = ?" );
query.setParameter ( 0, new Integer ( 50 ) );
Collection collection = query.list ();
userEntry.addGroups ( collection );
....
This code and query in the testing class works fine!
Now in the real application i've the same query (with the same mapping/s) and when i execute that query i get the error:
"no persistent classes found for query"
Any, ideas?
Regards,
Diego.
_________________ "What a revoltin' development this is!"
|