Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 294271 - incorrect id column validation when a MapsId exists
Summary: incorrect id column validation when a MapsId exists
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 2.3   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 2.3 M7   Edit
Assignee: Paul Fullbright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 306777
Blocks:
  Show dependency tree
 
Reported: 2009-11-04 17:27 EST by Karen Butzke CLA
Modified: 2010-04-26 17:51 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2009-11-04 17:27:53 EST
Using the JPA 2.0 spec example 4b in section 2.4.1.3
@Entity
public class Person {
	@Id
	String ssn;
}

@Entity
public class MedicalHistory {
	@Id
	String id; // overriding not allowed
	
	// default join column name ("patient_ssn") is overridden
	@MapsId("id")
	@JoinColumn(name="FK")
	@OneToOne
	Person patient;
}

I generated tables using EclipseLink and then we were left with one incorrect
validation warning on MedicalHistory.id:
"Column "id" cannot be resolved"

I believe the default column name should be "FK" and we also need a warning if they attempt to change that name using the @Column annotation.
Comment 1 Paul Fullbright CLA 2010-03-29 12:49:16 EDT
resolved with bug 306777
Comment 2 Karen Butzke CLA 2010-04-26 17:51:42 EDT
verified fixed in WTP build I-3.2.0-20100422053324