[hibernate-issues] [Hibernate-JIRA] Updated: (ANN-435) multiple @Id attributes not handled correctly

Diego Pires Plentz (JIRA) noreply at atlassian.com
Fri Jul 13 00:40:52 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diego Pires Plentz updated ANN-435:
-----------------------------------

    Component/s: binder

> multiple @Id attributes not handled correctly
> ---------------------------------------------
>
>                 Key: ANN-435
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-435
>             Project: Hibernate Annotations
>          Issue Type: Bug
>          Components: binder
>    Affects Versions: 3.2.0.cr1
>         Environment: hibernate 3.2.0.cr2 hsql 1.8.0.4
>            Reporter: Patrick Moore
>
> Defining a class with 2 @Id annotations should report a error or it should work. Instead only the first field with the @Id attribute is marked as a primary key but both are marked as nonnull.
> For example:
> public class IdUsing2 {
>     @Id
>     public Integer databaseId;
>     @Id @GeneratedValue
>     public Long entityId;   
> }
> results in this SQL:
> 18:26:57,765 DEBUG [SchemaExport] create table IdUsing2 (entityId bigint not null, databaseId integer not null, idl bigint, value varchar(255), primary key (databaseId))
> and no warning or error message.

-- 
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