[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4870) Cannot determine java-type from given member [null]
Andreas Joseph Krogh (JIRA)
noreply at atlassian.com
Mon Mar 29 15:33:31 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35998#action_35998 ]
Andreas Joseph Krogh commented on HHH-4870:
-------------------------------------------
Hi, thanks for looking into this.
The nature of this mapping is that all Persons _may_ map to a Company, but the (nullable) FK in the database points to a UNIQUE key not being the @Id of "the other side". There are historical reasons for why the database is like this.
Why is this association effectively a one-to-one mapping? I know it's not common to have a ManyToOne-relationship with an FK to a none- at Id column on the other side, but "companyId" (columnname="id") is a UNIQUE-key in Company and should work just fine, making this a certified @ManyToOne-relation AFAICT. This is the reason why "referencedColumnName" exists on the @JoinColumn annotation if I'm not misstaking. This worked fine with JPA1/Hibernate-3.3.2 and I believe I'm not the only person having this issue when upgrading to Hibernate-3.5.
I certainly hope you find the time to fix this before going GA.
> Cannot determine java-type from given member [null]
> ---------------------------------------------------
>
> Key: HHH-4870
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4870
> Project: Hibernate Core
> Issue Type: Bug
> Components: entity-manager
> Affects Versions: 3.5.0-Beta-4
> Environment: jdk 6u18
> glassfishv3
> Reporter: Marcial Atienzar
> Assignee: Steve Ebersole
> Fix For: 3.5.0.Next
>
> Attachments: eclipse.debug, Empre.java, hibernate.cfg.xml, hibernateTest.ear, jpa2-failure-java.jar, jpa2-failure.jar, persistence.xml, Prcontra.java, PrcontraPK.java
>
>
> I've tested to migrate from hibernate 3.3.2 to 3.5.0 Beta4.
> I've remove all hibernate*.jar from classpath and add only de hibernate3.jar
> I've downloaded the source off hibernate-entitymanager to debug from eclipse. I've reached the class that has the error, but I don't know what can I do to resolve it.
> I'm doing something wrong?
> I attatch the sources of the classes that takes part on eclipse debug.
> I don't know how to attach a testcase. The project has more than 200 entities.
> I've post previously in hibernate forums:
> https://forum.hibernate.org/viewtopic.php?f=1&t=1002363&p=2424419#p2424419
--
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
More information about the hibernate-issues
mailing list