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

How to configure datatypeFactory for the Custom IDatabaseConnections? #67

Closed
haocao opened this Issue Jan 30, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@haocao
Copy link

haocao commented Jan 30, 2015

I need to config the datatypeFactory(eg:MysqlDataTypeFactory) inside of the applicationContext.xml of dbUnitDatabaseConfig, could you tell me how to config it into the below configurations?Thanks

Custom IDatabaseConnections

<bean id="dbUnitDatabaseConfig" class="com.github.springtestdbunit.bean.DatabaseConfigBean">
    <property name="skipOracleRecyclebinTables" value="true"/>
</bean>
<bean id="dbUnitDatabaseConnection" class="com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean">
    <property name="databaseConfig" ref="dbUnitDatabaseConfig"/>
</bean>
@philwebb

This comment has been minimized.

Copy link
Contributor

philwebb commented Jan 30, 2015

You should be able to use the datatypeFactory property. Something like this:

<bean id="dbUnitDatabaseConfig" class="com.github.springtestdbunit.bean.DatabaseConfigBean">
    <property name="skipOracleRecyclebinTables" value="true"/>
    <property name="datatypeFactory" ref="dbUnitDataTypeFactory"/>
</bean>
<bean id="dbUnitDataTypeFactory" class="org.dbunit.ext.mysql.MySqlDataTypeFactory">
</bean>
<bean id="dbUnitDatabaseConnection" class="com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean">
    <property name="databaseConfig" ref="dbUnitDatabaseConfig"/>
</bean>
@devtomk

This comment has been minimized.

Copy link

devtomk commented Dec 21, 2017

Is it possible to do this through annotations? I need to supply data type factory for Postgres to that UUID columns are detected by DbUnit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment