# Opt-in to use native types with reusing existing Neo4j driver instance

**URL:** <https://community.neo4j.com/t/opt-in-to-use-native-types-with-reusing-existing-neo4j-driver-instance/17895>\
**Category:** Drivers & Stacks\
**Tags:** bolt, java-driver, ogm\
**Created:** [April 30, 2020, 1:38pm UTC](https://community.neo4j.com/t/opt-in-to-use-native-types-with-reusing-existing-neo4j-driver-instance/17895 "2020-04-30T13:38:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/frank/32/5404_2.png) [@frank](https://community.neo4j.com/u/frank)\
**Post date:** [April 30, 2020, 1:38pm UTC](https://community.neo4j.com/t/opt-in-to-use-native-types-with-reusing-existing-neo4j-driver-instance/17895/1 "2020-04-30T13:38:15Z")

</div>

I try to use the `Micronaut Neo4j` integration, which provides a `org.neo4j.driver.v1.Driver` bean, in combination with the `Neo4j-OGM` native property types.

Currently I use the following `sessionFactory` bean

```auto
@Requires(classes = [SessionFactory::class])
@Factory
class OgmFactory(
    private val driver: Driver
) {
    @Bean(preDestroy = "close")
    fun sessionFactory(): SessionFactory {
        val boltDriver = BoltDriver(driver) // how to set useNativeTypes here?
        return SessionFactory(boltDriver, "my.domain")
    }
}

```

Does anybody know how to opt-in to use native types with reusing existing Neo4j driver instance?

It works when using the `Configuration.Builder().useNativeTypes()...`, but I want to avoid that the driver get's created multiple times.

Thank you
