[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-508) @GeneratedValue does not work with composite primary key

Xiaolong Hao (JIRA) jira-events at lists.jboss.org
Thu Mar 12 10:05:23 EDT 2009


    [ https://jira.jboss.org/jira/browse/EJBTHREE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12456908#action_12456908 ] 

Xiaolong Hao commented on EJBTHREE-508:
---------------------------------------

if possible can we re-visit this issue? We do have a case that we need a composite key with one surrogate field and one for db schema so that we can access same functional table in different schema. Plus,
hibernate is handling it in xml configuration. HHH-2060. 

> @GeneratedValue does not work with composite primary key
> --------------------------------------------------------
>
>                 Key: EJBTHREE-508
>                 URL: https://jira.jboss.org/jira/browse/EJBTHREE-508
>             Project: EJB 3.0
>          Issue Type: Bug
>    Affects Versions: EJB 3.0 RC6 - PFD
>            Reporter: Holger Johanndeiter
>            Assignee: Emmanuel Bernard
>         Attachments: User.java, UserPK.java
>
>
> I have an entity with a primary key class (@IdClass annotation) where i want the id to be auto-generated. (see forum post)
> That does not happen though, no ids are generated, the only id i get is 0. (leads to one database entry where the id is 0, after that errors of course). 
> Database is Hypersonic SQL.
> The entity works perfectly fine without @IdClass annotation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list