Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » @OneToMany and @ManyToOne in MongoDB and JPA -EISOneToOneMapping cannot be cast to
@OneToMany and @ManyToOne in MongoDB and JPA -EISOneToOneMapping cannot be cast to [message #1064146] Mon, 17 June 2013 19:55 Go to next message
Michael Hunziker is currently offline Michael HunzikerFriend
Messages: 4
Registered: June 2013
Junior Member
Hi all!

We're trying to do a @OneToMany and @ManyToOne relation with EclipseLink/MongoDB:

The @OneToMany declaration looks like this:

@NoSql(dataType = "ServiceCatalog", dataFormat = DataFormatType.MAPPED)
public class ServiceCatalog {

@Field(name = "_id")
private String id;

private List<ServiceCatalogNeedCategory> serviceCatalogNeedCategories;
On the other side, the @ManyToOne declaration:

@NoSql(dataType = "NeedCategory", dataFormat = DataFormatType.MAPPED)
public class ServiceCatalogNeedCategory {

@Field(name = "_id")
private String id;

@Field(name = "title")
private String Title;

private ServiceCatalog serviceCatalog;
The above configuration leads to the following error: org.eclipse.persistence.eis.mappings.EISOneToOneMapping cannot be cast to org.eclipse.persistence.mappings.OneToOneMapping

We really need to be able to resolve both directions.

Thanks foryour help.

Cheers Michae
Re: @OneToMany and @ManyToOne in MongoDB and JPA -EISOneToOneMapping cannot be cast to [message #1064296 is a reply to message #1064146] Tue, 18 June 2013 14:56 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Please include the full stack trace and the version you are using. Also try the 2.5 release, or 2.6 dev builds.

James : Wiki : Book : Blog : Twitter
Previous Topic:EclipseLink and MongoDB - Auto incrementing field
Next Topic:CanonicalModelProcessor not found
Goto Forum:

Current Time: Mon Jun 18 23:30:51 GMT 2018

Powered by FUDForum. Page generated in 0.01416 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top