Community
Participate
Working Groups
Build Identifier: 20100917-0705 The 'name' element of inverseJoinColumns and joinColumns elements of JoinTable annotation is missing if the 'name' element of JoinTable annotation is specified. Note: Same issue exists with the 'name' element of joinColumns element of CollectionTable annotation when the 'name' element of CollectionTable annotation is specified. Reproducible: Always Steps to Reproduce: 1. Apply @JoinTable annotation to an attribute of a Java entity 2. Specify the name element of JoinTable annotation 3. Specify the joinColumns element of JoinTable annotation 4. Try to use code completion to input the name element of the @JoinColumn, which is the value of joinColumns element The annotation would look like @JoinTable(name = "PROJ_EMP", joinColumns = @JoinColumn()) The 'name' element is missing from the list of the elements of @JoinColumn; however, if not specifying the 'name' element before specifing joinColumns/inverseJoinColumns, the 'name' element of @JoinColumn would show up.
It also appears that the nested 'name' element will appear in code completion if a value for 'name' has been specified or is empty string. Also, if any other element is specified in the nested annotation, the 'name' element will appear in the completion list. This would appear to be a bug in the JDT completion code. I've reproduced with a generic test case and have opened bug 330622 against the JDT.
Moving JPA specific bugs to new JPA component in bugzilla.