Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database configurations fails #13

Open
jmuilu opened this issue Jul 2, 2017 · 3 comments
Open

database configurations fails #13

jmuilu opened this issue Jul 2, 2017 · 3 comments

Comments

@jmuilu
Copy link

jmuilu commented Jul 2, 2017

Looks like it is not possible to change the driver and dialect from the defaults (mysql)
database {
driver = "com.ibm.db2.jcc.DB2Driver"
dialect = "org.hibernate.dialect.DB2Dialect"
}
cfg generation gives:

<hibernate-configuration>
    <session-factory>
        <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
...
        <property name="hibernate.current_session_context_class">thread</property>
        <property name="hibernate.connection.zeroDateTimeBehavior">convertToNull</property>
    </session-factory>
</hibernate-configuration>
@bioinfornatics
Copy link
Contributor

Thanks for the report I will take a look.
Did you used the latest release?

@jmuilu
Copy link
Author

jmuilu commented Jul 6, 2017 via email

@molexx
Copy link
Contributor

molexx commented May 30, 2018

This seems to be working for me:

    ...
    ,driver      : "org.postgresql.Driver"
    ,dialect     : "org.hibernate.dialect.PostgreSQL9Dialect"
    ...
       ...
        <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQL9Dialect</property>
        <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
        ...

I did have to do a clean first to delete the .cfg.xml file though as it was previously generated using a different driver and it doesn't notice when you change the config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants