[jbosstools-issues] [JBoss JIRA] (JBIDE-19015) JPA Hibernate validator cannot work with the annotation @ElementCollection

Matous Jobanek (JIRA) issues at jboss.org
Thu Jan 8 10:15:32 EST 2015


     [ https://issues.jboss.org/browse/JBIDE-19015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matous Jobanek updated JBIDE-19015:
-----------------------------------
    Attachment: ui-ejb-minimized.zip


> JPA Hibernate validator cannot work with the annotation @ElementCollection
> --------------------------------------------------------------------------
>
>                 Key: JBIDE-19015
>                 URL: https://issues.jboss.org/browse/JBIDE-19015
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: hibernate
>         Environment: JBDS 8.0.1.GA
>            Reporter: Matous Jobanek
>         Attachments: ui-ejb-minimized.zip
>
>
> The JPA Hibernate cannot work with variables annotated with the annotation @ElementCollection. When this annotation is used and for example the annotation @ManyToOne is used as well, the JBDS shows errors at places where they shouldn't be. 
> Follow my instructions to reproduce this issue:
> 1. Download attached reproducer ui-ejb-minimized.zip
> 2. Extract it
> 3. Import the project into JBDS as an existing maven project
> 4. Look at the errors. There are two errors for this project:
> {noformat}
> Target entity is not defined	Person.java	/ui-ejb-minimized/src/main/java/org/jboss/seam/example/ui	line 25	JPA Problem
> The given name of the entity "org.jboss.seam.example.ui.Country" is empty	Country.java	/ui-ejb-minimized/src/main/java/org/jboss/seam/example/ui	line 9	JPA Problem
> {noformat}
> Both of them are unnecessary because both the target entity and the name of the entity are optional.
> 5. Comment the variable:
> {code}
> @ElementCollection
> private List<String> notes = new ArrayList<String>();
> {code}
> 6. Save the class Person
> 7. Click on Project -> Clean 
> Then all the errors will disappear. 
> 8. uncomment the variable with the annotation back
> 9.  Save the class Person
> 10. Click on Project -> Clean 
> The two errors are back
> The attached reproducer is minimized Seam project ui-ejb of the example ui. https://github.com/seam2/jboss-seam/tree/Seam_2_3/examples/ui
> This Seam example is more complicated and the number of the wrong errors shown in JBDS is much bigger.



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jbosstools-issues mailing list