Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Thanaphorn Thongthien
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are trying to persist an a array of Strings directly - you can only persist mapped classes.
 
Thanaphorn Thongthien
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With JPA 2.0 you can use @ElementCollection on a collection class to persist the Strings and hibernate (also?) supports @CollectionOfElements
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic