-
Nov 1st, 2009, 01:16 PM
#1
Persisting Spring beans through hibernate
Hi,
I am a newbie, and I have a question when using hibernate within Spring.
I first made the classes to persist, by making them Spring beans (defined in the bean config file).
I defined the classes with interfaces, and I accessed the classes through ApplicationContext.getBean()
Now, the problem was that I got "net.sf.hibernate.MappingException:Unknown entity class...." when saving the class instance.
So, I tried making the classes to persist ordinary classes, and this worked fine.
Question is: should the first approach have worked?
Thanks for any insight!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules