You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org> on 2007/02/01 03:43:05 UTC

[jira] Created: (OPENJPA-121) Table name defaults to the class name instead of the entity name

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

                 Key: OPENJPA-121
                 URL: https://issues.apache.org/jira/browse/OPENJPA-121
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa
            Reporter: Marc Prud'hommeaux
            Priority: Minor


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-121) Table name defaults to the class name instead of the entity name

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478670 ] 

Patrick Linskey commented on OPENJPA-121:
-----------------------------------------

Tested with annotations; have not tested with XML-based entity names.

> Table name defaults to the class name instead of the entity name
> ----------------------------------------------------------------
>
>                 Key: OPENJPA-121
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-121
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>            Reporter: Marc Prud'hommeaux
>            Priority: Minor
>             Fix For: 0.9.7
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-121) Table name defaults to the class name instead of the entity name

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey updated OPENJPA-121:
------------------------------------

    Fix Version/s: 0.9.7

> Table name defaults to the class name instead of the entity name
> ----------------------------------------------------------------
>
>                 Key: OPENJPA-121
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-121
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>            Reporter: Marc Prud'hommeaux
>            Priority: Minor
>             Fix For: 0.9.7
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-121) Table name defaults to the class name instead of the entity name

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey resolved OPENJPA-121.
-------------------------------------

    Resolution: Fixed

> Table name defaults to the class name instead of the entity name
> ----------------------------------------------------------------
>
>                 Key: OPENJPA-121
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-121
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>            Reporter: Marc Prud'hommeaux
>            Priority: Minor
>             Fix For: 0.9.7
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.