[hibernate-issues] [Hibernate-JIRA] Resolved: (ANN-669) More then one @Id silently fail
Diego Pires Plentz (JIRA)
noreply at atlassian.com
Fri Nov 2 20:42:29 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Diego Pires Plentz resolved ANN-669.
------------------------------------
Assignee: Diego Pires Plentz
Resolution: Duplicate
> More then one @Id silently fail
> -------------------------------
>
> Key: ANN-669
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-669
> Project: Hibernate Annotations
> Issue Type: Bug
> Affects Versions: 3.3.0.ga
> Environment: Hibernate 3.2.5, MySQL
> Reporter: Hontvári József
> Assignee: Diego Pires Plentz
> Priority: Minor
>
> If two fields have @Id and the class has no @IdClass annotation then the first(?) field will disappear from Hibernate metadata. I.e. you will see in the log in a "EntityLoader Static select for entity..." entry that the select doesn't contain the field.
> (If you add an @IdClass or leaves only one @Id annotation makes the column appear again.)
> The first problem is that is doesn't say anything, even on trace logging level, it just fails in a strange way.
> The second is that I belive the @IdClass shouldn't be required anyway. There is a similar construct in the xml mapping using the composite-id element: if no primary key class is supplied then the entity class itself become the key class. This is not as rude as it seems, just imagine a class of which all attributes are part of the primary key.
--
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