Skip to main content



      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 15:55 Go to next message
Eclipse UserFriend
Hi all!

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

The @OneToMany declaration looks like this:

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

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

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

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

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

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

@ManyToOne(fetch=FetchType.LAZY)
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 10:56 Go to previous message
Eclipse UserFriend
Please include the full stack trace and the version you are using. Also try the 2.5 release, or 2.6 dev builds.
Previous Topic:EclipseLink and MongoDB - Auto incrementing field
Next Topic:CanonicalModelProcessor not found
Goto Forum:
  


Current Time: Sat Jul 12 19:24:28 EDT 2025

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

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

Back to the top