users@glassfish.java.net

Re: _at_OneToMany(mappedBy) - not working...

From: <glassfish_at_javadesktop.org>
Date: Mon, 06 Aug 2007 04:17:12 PDT

"...[class sam.core.ejb.Website] has a mappedBy value of [Website] which does not exist..."

Did you set the mappedBy attribute to "website"? As this attribute needs to be the name of the variable in the corresponding class, for example:

Website:
@OneToMany(mappedBy="the_website")
private List<Crawl> crawls;

Crawl:
@ManyToOne
@JoinColumn(name="website_id")
private Website the_website;
[Message sent by forum member 'danielrhoades' (danielrhoades)]

http://forums.java.net/jive/thread.jspa?messageID=229587