Issue Details (XML | Word | Printable)

Key: NUCJPA-117
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Guillaume Houdmon
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus API JPA

CollectionTable name not used if also specifying @Column

Created: 03/Mar/11 05:04 PM   Updated: 28/Mar/11 06:29 PM   Resolved: 09/Mar/11 02:32 PM
Component/s: API
Affects Version/s: 3.0.0.m1
Fix Version/s: 2.1.8, 3.0.0.m3

File Attachments: 1. Zip Archive (4 kB)

Datastore: MySQL
Severity: Development

 Description  « Hide
@CollectionTable name attribute is not used to map the table.


public class Table ... {

  @CollectionTable(name = "mytable_property", joinColumns = @JoinColumn(name = "id_mytable"))
  @Column(name = "value")
  @MapKeyColumn(name = "name")
  private Map<String, String> properties = ...

The sql table is "TABLE_STRING" instead of "mytable_property".

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 03/Mar/11 05:21 PM
When I run simple testcases with @ElementCollection and @CollectionTable whether the field is Set or Map I get the join table with the correct name that I specified.

As the front page of JIRA, please provide a testcase that demonstrates what you are seeing, as per

Guillaume Houdmon added a comment - 09/Mar/11 01:37 PM
Test case.

Andy Jefferson added a comment - 09/Mar/11 02:32 PM
Reproduced, thx, due to the additional @Column (which can also provide a table name, for other things). SVN for 2.x and 3.x fix this