Bug 330600 - Code completion for joinColumns and inverseJoinColumns elements of JoinTable annotation
Summary: Code completion for joinColumns and inverseJoinColumns elements of JoinTable ...
Status: ASSIGNED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 330622
Blocks:
  Show dependency tree
 
Reported: 2010-11-18 14:24 EST by Nan Li CLA
Modified: 2011-07-01 16:25 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Li CLA 2010-11-18 14:24:54 EST
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.
Comment 1 Neil Hauge CLA 2010-11-18 17:25:47 EST
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.
Comment 2 Neil Hauge CLA 2011-07-01 16:25:02 EDT
Moving JPA specific bugs to new JPA component in bugzilla.