Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] EIS OneToMany issue

Hi,

I'm sorry for posting this on the dev list, but eclipselink-users seems to be down at the moment.
Congratulations on a great ORM framework, I'm very interested in the EIS support offered by EclipseLink.
I am encountering this issue with the one-to-many relationship using the latest org.persistence.core from svn :
Caused by: java.lang.ClassCastException: org.eclipse.persistence.eis.mappings.EISOneToOneMapping cannot be cast to org.eclipse.persistence.mappings.OneToOneMapping
at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.processOneToManyMapping(OneToManyAccessor.java:207)

My model is pretty simple - an Album has many Tracks, and since my EIS records do not support collections I would like the foreign key to be on the target (Track) :
---------------------
@Entity
@NoSql(dataFormat = DataFormatType.MAPPED)
public class Album {

@Id
public String id;

@OneToMany(mappedBy = "album")
public List<Track> tracks;
}
---------------------
@Entity
@NoSql(dataFormat = DataFormatType.MAPPED)
public class Track {

@Id
@GeneratedValue
public byte[] id;

public int number;

public String name;

@ManyToOne
public Album album;
}
---------------------


Any idea what I might be doing wrong?

Thanks,
Julien


Back to the top