-->
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: got the Unkonw entity error. using Native SQL Query
PostPosted: Thu Jun 23, 2005 7:30 pm 
Newbie

Joined: Thu Jun 23, 2005 7:16 pm
Posts: 1
Hi

I have a question to use native sql query in hibernate. Is the entity object specified in the native sql query required as the object mapping to the database table ?
For example,
Query = session.createSQLQuery(sql).addEntity("user", User.class);

Must the User.class be the entity class that maps to the database table ?
Can user object be any dynamic class type that does not map to the database table ? I got the Unkonw entity error.

Thanks


org.hibernate.MappingException: Unknown entity:


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.