-->
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.  [ 3 posts ] 
Author Message
 Post subject: Persisting Model subclass throws Unknown Entity
PostPosted: Mon Nov 21, 2005 3:19 am 
Newbie

Joined: Wed Nov 12, 2003 7:20 am
Posts: 6
I realized that when persisting Model subclass, Hibernate will throw HibernateSystemException: Unknown Entity.

For cases like:

User - Model Name

UserForm - extends User

When calling userManager.createUser((User) userForm), will not be allowed.

I know this can be easily solved through other means. Just want to confirm if there is workaround/config/setting somewhere to allow Hibernate to accept subclasses of Peristent class.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 21, 2005 3:24 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
what does userManager.createUser do? I'm not sure I understand your question ... ;)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 21, 2005 3:31 am 
Newbie

Joined: Wed Nov 12, 2003 7:20 am
Posts: 6
Sovled my own problem. Should have checked the javadoc fore more info. Can actually use other save method.

session.save(String entityName, Object object);

entityName = User class name.


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

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.