[jbosstools-issues] [JBoss JIRA] (JBIDE-11975) JPA Tooling - Adding JPA Annotations to a POJO - Allow users to choose the field to be marked as PK

Koen Aers (JIRA) jira-events at lists.jboss.org
Thu Oct 10 11:34:03 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-11975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12813188#comment-12813188 ] 

Koen Aers commented on JBIDE-11975:
-----------------------------------

Moving to the 4.2.x stream as 4.1.x is feature frozen
                
> JPA Tooling - Adding JPA Annotations to a POJO - Allow users to choose the field to be marked as PK
> ---------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-11975
>                 URL: https://issues.jboss.org/browse/JBIDE-11975
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: hibernate
>            Reporter: Vimal Kansal
>            Assignee: Koen Aers
>              Labels: jpa
>             Fix For: 4.2.x
>
>
> Hi,
> I am using JBDS 5.0 Beta 3. I created a POJO with follwoing attributes :
> String username;
> String password
> String loginCount;
> Then I invoked conetxt menu option "Generate Hibernate/JPA annotations", it generates only @Entity annotation. Obviously there is no way for the wizard to find out which attribute should act as PK. However if I include a string "id" anywhere in "username" e.g idusername, usernameid, useridname, it assumes it to be the PK and generates @Id and @GeneratedValue annotation. I wonder if this is by design? I think a better approach would be to let the user choose on the wizard, which field he wants to mark as PK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list