Table name generated for @ElementCollection uses owning entity class name instead of mapped entity name

Description

If no collection table is specifically mapped and an entity name is specified (via @Entity(name="...") , the table name generated for @ElementCollection starts with its (unqualified) owning entity class name. It should start with the mapped entity name instead.

For example:

1 2 3 4 5 6 7 8 @Entity(name="Mtx") public class Matrix { @Id private Integer id; @ElementCollection private Set<Integer> mvalues = new HashSet<Integer>(); }

Currently, the collection table is named "Matrix_mvalues"; it should be "Mtx_mvalues".

Environment

None

Status

Assignee

Gail Badner

Reporter

Gail Badner

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.3.5
4.2.14

Priority

Major