[jboss-jira] [JBoss JIRA] Resolved: (EJBTHREE-694) @OneToOne relation fails, when foreign key is in inverse side
Emmanuel Bernard (JIRA)
jira-events at lists.jboss.org
Tue Feb 13 21:59:31 EST 2007
[ http://jira.jboss.com/jira/browse/EJBTHREE-694?page=all ]
Emmanuel Bernard resolved EJBTHREE-694.
---------------------------------------
Resolution: Rejected
Use the forum http://forum.hibenate.org for user questions
> @OneToOne relation fails, when foreign key is in inverse side
> -------------------------------------------------------------
>
> Key: EJBTHREE-694
> URL: http://jira.jboss.com/jira/browse/EJBTHREE-694
> Project: EJB 3.0
> Issue Type: Bug
> Components: EJB3 Extensions
> Affects Versions: EJB 3.0 RC8 - FD
> Environment: JBoss AS 4.0.4 GA3 with jboss-EJB-3.0_RC8-FD installed as described in the release.
> Reporter: Martin Isheim
>
> I defined a OneToOne relation from "UserEntity" to "PasswordEntity", with the foreign key in the "PasswordEntity" (for historical reasons).
> With EntityManager.persist() the entities were inserted into the database, but the foreignKey column in "PasswordEntity" is empty.
> Reading the "UserEntity" provides an empty relation.
> Here the getter from "UserEntity":
> <code>
> private PasswordEntity password;
> @OneToOne(optional = true, cascade = CascadeType.ALL)
> @PrimaryKeyJoinColumn(name = "ENTITYKEY", referencedColumnName = "USERKEY")
> public PasswordEntity getPassword() {
> return password;
> }
> </code>
> Since the relation is unidirectional, "PaswordEntity" has no getter/setter.
> Regards.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list