The moose likes Object Relational Mapping and the fly likes Getting Mapping Exception in Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Getting Mapping Exception in Hibernate" Watch "Getting Mapping Exception in Hibernate" New topic
Author

Getting Mapping Exception in Hibernate

Harjit Singh
Ranch Hand

Joined: Feb 01, 2007
Posts: 77
I have an XML which goes some thing like this

<Form>
<dataset1>


</dataset1>
<dataset2>
</dataset2>
<dataset3>
</dataset3>
</Form>


The way my pojo classes have been created is that I have Form Class which actually is a container for all the datasets. The dataset are basically collections in the Form class. Unfortunately, I haven't defined a .hbm.xml file for Form because it doesn't have any table. When I tried to insert the POJO, I get an error saying unknown entity Form. I know a lot of people might have faced this situation, how can I handle this case

Thanks
[ May 22, 2007: Message edited by: Harjit Singh ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 16622

Then don't call save(form), and loop through your collection of datasets and call save(dataset) on each one.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
 
subject: Getting Mapping Exception in Hibernate
 
Threads others viewed
running applet through JSP
PreparedStatement (displaying records)
Initializing an object for reuse
showing applet embedded in jsp
best way to convert plugin classes from struts to spring
MyEclipse, The Clear Choice