From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-27 23:08:39
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-381?pa= ge=3Dall ] Emmanuel Bernard updated ANN-381: --------------------------------- Fix Version: 3.2.0 > Make possible to specify an @EmbeddedId's field in a @OneToMany's mappedB= y property > -------------------------------------------------------------------------= ---------- > > Key: ANN-381 > URL: http://opensource.atlassian.com/projects/hibernate/browse/A= NN-381 > Project: Hibernate Annotations > Type: Improvement > Components: binder > Environment: Hibernate's annotations packaged in JBoss EJB 3.0 RC8- FD > Microsoft SQL Server 2000 > Reporter: Pierre Four=C3=A8s > Fix For: 3.2.0 > > > As described in hibernate forum (http://forum.hibernate.org/viewtopic.php= ?t=3D960763) and discussed with Emmanuel, it would be very nice to be able = to specify in an @OneToMany's mappedBy property the field of an @EmbeddedId= . > For example, i would like to be able run this example : > @Entity > public class Card { > @OneToMany(cascade=3DCascadeType.ALL, fetch=3DFetchType.EAGER, mappedB= y=3D"primaryKey.card") > private Set<CardField> fields;=20 > } > @Entity > public class CardField implements Field { > @EmbeddedId > private PrimaryKey primaryKey =3D new PrimaryKey(); > =20 > @Embeddable > class PrimaryKey implements Serializable { > @ManyToOne(optional =3D false) > private Card card; > =20 > @ManyToOne(optional =3D false) > private Key key; > } > } > @Entity > public class Key {} --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |