aspose file tools*
The moose likes Object Relational Mapping and the fly likes org.hibernate.MappingException: Unknown entity: java.lang.String<< how can i solve Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "org.hibernate.MappingException: Unknown entity: java.lang.String<< how can i solve" Watch "org.hibernate.MappingException: Unknown entity: java.lang.String<< how can i solve" New topic
Author

org.hibernate.MappingException: Unknown entity: java.lang.String<< how can i solve

Thanaphorn Thongthien
Greenhorn

Joined: Aug 03, 2010
Posts: 15
i need to get the value from the radio type button and use controller to keep it in database again and i encounter this problem,,Could you help me or suggest me where to solve

this is my view


and this is my controller


and this is an error


the hibernate class


please help


Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You are trying to persist an a array of Strings directly - you can only persist mapped classes.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Thanaphorn Thongthien
Greenhorn

Joined: Aug 03, 2010
Posts: 15
so...is there have any ways to get the data and save them in database?? because i have no experiences about this....Help me again
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

With JPA 2.0 you can use @ElementCollection on a collection class to persist the Strings and hibernate (also?) supports @CollectionOfElements


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.hibernate.MappingException: Unknown entity: java.lang.String<< how can i solve
 
Similar Threads
Access variable value from Java file to Jsp file.
Spring - passing values by parametrs to Controller
Unable to upload file
Spring form input binding problem
helloworld spring mvc