[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4312) NamingStrategy.classToTableName receives only class name, not a fully qualified name as stated in javadoc

Manuel Bernhardt (JIRA) noreply at atlassian.com
Fri Apr 1 12:43:08 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41936#action_41936 ] 

Manuel Bernhardt commented on HHH-4312:
---------------------------------------

Just got hit with this as well, it's kinda annoying (I picture myself manually naming all entities by hand to get the full class names).

What about the "getDefaultEntityName(String className)"? I think it's a good approach. It would most likely break drop-in replacement for existing naming strategy implementations (they'd miss the method) but OTOH this bug renders the NamingStrategy unusable when wanting to do things like a NamespaceNamingStrategy.



> NamingStrategy.classToTableName receives only class name, not a fully qualified name as stated in javadoc
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-4312
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4312
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: annotations
>            Reporter: Lóránt Pintér
>         Attachments: hibernate-annotations-3.2.1.patch.txt
>
>
> I have a custom NamingStrategy that overrides classToTableName in EJB3NamingStrategy. Prior to upgrading to Hibernate 3.1.3, my NamingStrategy implementation received the correct classnames as documented in the javadoc at http://www.hibernate.org/hib_docs/v3/api/org/hibernate/cfg/NamingStrategy.html#classToTableName(java.lang.String)
> Since then, it only receives the name of the class without the package specification. I tried upgrading to 3.2.0.cr2, but it didn't help.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list