Issue Details (XML | Word | Printable)

Key: OPENJPA-121
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Marc Prud'hommeaux
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenJPA

Table name defaults to the class name instead of the entity name

Created: 01/Feb/07 02:42 AM   Updated: 07/Mar/07 02:05 AM
Return to search
Component/s: jpa
Affects Version/s: None
Fix Version/s: 0.9.7

Time Tracking:
Not Specified

Resolution Date: 07/Mar/07 02:04 AM


 Description  « Hide
Section 9.1.1 of the JPA 1.0 spec says that if the @Table annotation is not defined, then it should default to the name of the entity. However, we always default to the name of the class. For example, the entity define as "@Entity(name="FOO") public class Bar" should default to be mapped to the table named "FOO", but we incorrectly default to "Bar".

The workaround is to just specify the @Table name as well.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Patrick Linskey added a comment - 07/Mar/07 02:05 AM
Tested with annotations; have not tested with XML-based entity names.