Bug 355697 - Map in Combination with @MapKeyColumn and enum doesn't work
Summary: Map in Combination with @MapKeyColumn and enum doesn't work
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-24 08:48 EDT by Missing name CLA
Modified: 2022-06-09 10:31 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 Missing name CLA 2011-08-24 08:48:03 EDT
Build Identifier: 2.1.2

@OneToMany
@JoinTable(name = "ISSUE_EMPLOYEE",
    joinColumn = @JoinColumn(name = "ISSUE_ID"),
    inverseJoinColumn = @JoinColumn("EMPLOYEE_ID"))
@MapKeyColumn(name="EMPLOYEEPOSITION_ID") 
private Map<EmployeePosition, Employee> namedEmployees = new Hashtable<EmployeePosition, Employee>();

leads to an Exception:

Internal Exception: java.sql.SQLException: ORA-00904: "EMPLOYEES": invalid identifier

Error Code: 904 Call: INSERT INTO ISSUE_EMPLOYEE (ISSUE_ID, EMPLOYEES, EMPLOYEEPOSITION_ID) VALUES (?, ?, ?) bind => [27, [B@18b85d, SERVICE]

More details:
http://stackoverflow.com/questions/4955545/jpa-map-a-mapenum-entity

Reproducible: Always

Steps to Reproduce:
1. Using MapKeyColumn with an Java enum as Key for a Map
Comment 1 Tom Ware CLA 2011-09-22 11:34:03 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:31:24 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink