I got it to work by looking at your example Konstantin. Thanks! Now I'm having a problem where I want to set a unique contraint on name and userId in my resume table. Following Konstantin's example, I have my one-to-many relationship information on my User class, and the Resume class just has a userId column. In other words, the Resume knows nothing about the relationship (right).
Is it possible to change my getResume's xdoclet tags to handle this? /** * Returns the resumes. * @return Set * * @hibernate.set role="resumes" table="resume" * @hibernate.collection-key column="id" length="32" * @hibernate.collection-one-to-many class="org.apache.persistence.Resume" * @ejb.persistence */ public Set getResumes() { return resumes; } Thanks, Matt > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Konstantin Priblouda > Sent: Sunday, December 22, 2002 7:00 AM > To: Matt Raible > Cc: hibernate-devel > Subject: Re: [Hibernate] Problem using Xdoclet to generate > relationships [newbie] > > > > --- Matt Raible <[EMAIL PROTECTED]> wrote: > > I'm a rookie at using Hibernate, so please bear with > > me. > > > > I have User object that has a one-to-many mapping to > > a Resume object. I > > am getting the exception below when trying to > > persist the resume. > > > > I believe I might be doing something wrong with the > > addMethod method on > > my DAO. The passed in "resume" object already has a > > "user" object set > > on it. > > > > It looks that it does not like your classes... > Unfortunately you did not provided line numbers in yur > snippet - si I can not say what exactly offendet > hibernate... > > regards, > > ===== > Konstantin Priblouda ( ko5tik ) Freelance Software developer > < http://www.pribluda.de > < play java games -> http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel