-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: No persistent classes error not always occur
PostPosted: Wed Jul 21, 2004 4:19 pm 
Newbie

Joined: Tue Nov 25, 2003 10:20 pm
Posts: 1
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!"


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.