[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2933) DialectFactory dialects should be in a properties file

Tomoto Shimizu Washio (JIRA) noreply at atlassian.com
Tue Sep 23 02:10:04 EDT 2008


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

Tomoto Shimizu Washio commented on HHH-2933:
--------------------------------------------

Regarding my question (1), it seems passing Connection would be OK...  There would be no point to hate it because DatabaseMetaData provided some methods that seemed to access to the database to get the information, which would mean giving a virtual permission to DialectResolver to access to the database anyway.

Let me give it a shot.

> DialectFactory dialects should be in a properties file
> ------------------------------------------------------
>
>                 Key: HHH-2933
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2933
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.2.5
>            Reporter: Mikael Kopteff
>         Attachments: dialect_registration.zip
>
>
> Currently the DialectFactory has the static attribute MAPPERS, that hold the dialects. If the dialect is not found, Hibernate will throw an exception. There is already an TODO tag, set for this.So, could this be possibly done, so that the values really are a) in a properties file or b)additions could be made to the map programmaticaly by users.
> This would be more flexible for advanced users, that work with experimental jdbc drivers(that don't return a standard name for the database).
> The current trunk version of DialectFactory:
> // TODO : this is the stuff it'd be nice to move to a properties file or some other easily user-editable place
> 	private static final Map MAPPERS = new HashMap();
> 	static {
> 		MAPPERS.put( "HSQL Database Engine", new VersionInsensitiveMapper( "org.hibernate.dialect.HSQLDialect" ) );
> 		MAPPERS.put( "H2", new VersionInsensitiveMapper( "org.hibernate.dialect.H2Dialect" ) );
> 		MAPPERS.put( "MySQL", new VersionInsensitiveMapper( "org.hibernate.dialect.MySQLDialect" ) );
>                 etc.....

-- 
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