From: <leg...@at...> - 2003-08-04 14:01:14
|
The following comment has been added to this issue: Author: Gavin King Created: Mon, 4 Aug 2003 9:00 AM Body: I think you're being too specific here! Don't think only about prefixes - that is just one application! For example, I might want to change the class name com.package.FooBar to the table name PACKAGE_FOO_BAR. And also consider whether you _really_ want to pass column names to the same method as property names, and table names to the same method as class names. I think a NamingStrategy might need to handle properties w/o column mappings differently to mapped column names. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-227 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-227 Summary: NamingStrategy / prefix support for database objects Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.0.2 Assignee: Reporter: Timo Verhoeven Created: Mon, 4 Aug 2003 6:29 AM Updated: Mon, 4 Aug 2003 6:29 AM Description: Initial feature idea from mailing list: Hi all! When I design database datamodels I usually encounter clashes between reserved names and names I'd like to use for my tables/columns, e.g. "user", "role", etc.. So I ended up prefixing all tables/views/columns: Tables have a "tbl" prefix, views a "qry" prefix and columns either have a "fld" or a prefix based on the datatype ("txt"/"str" for varchars, etc.). I like to keep my mapping files small (/ to have few xdoclet tags) and like the fact that hibernate has smart default for column names: it uses the property's name. Would it be possible/would you consider it useful to be able to specify "default prefixes" for tables/columns so that I don't have to name my columns manually in my mappings when I have to use prefixes? Such settings could go into the SessionFactory configuration. Opinions? Timo --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |