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

Type mismatch for instantiating DAO in 5.2.0 #160

Open
jymboche opened this issue Aug 20, 2020 · 0 comments
Open

Type mismatch for instantiating DAO in 5.2.0 #160

jymboche opened this issue Aug 20, 2020 · 0 comments

Comments

@jymboche
Copy link

I'm using vertx-jooq-rx-reactive with postgresql and in version 4.2 the generated DAO expected PgClient in its constructor like:

    public UsersDao(Configuration configuration, io.reactiverse.reactivex.pgclient.PgClient delegate) {
        super(Users.USERS, com.thfy.site.db.tables.pojos.Users.class, new ReactiveRXQueryExecutor<UsersRecord,com.thfy.site.db.tables.pojos.Users,Integer>(configuration,delegate,com.thfy.site.db.tables.mappers.RowMappers.getUsersMapper()));
    

But now in 5.2.0 I get a type mismatch because its expecting SqlClient:

    public UsersDao(Configuration configuration, io.vertx.reactivex.sqlclient.SqlClient delegate) {
        super(Users.USERS, com.thfy.site.db.tables.pojos.Users.class, new ReactiveRXQueryExecutor<UsersRecord,com.thfy.site.db.tables.pojos.Users,Integer>(configuration,delegate,com.thfy.site.db.tables.mappers.RowMappers.getUsersMapper()));
    }

Should I be using a different client or do i have something misconfigured? I inialize the PgPool like the following:

class DBStore(vertx: Vertx) {

    private val pool: PgPool
    private val configuration: DefaultConfiguration = DefaultConfiguration()

    init {

        configuration.set(SQLDialect.POSTGRES)

        val config = PgPoolOptions().apply {
            host = System.getenv("DB_HOST")
            port = System.getenv("DB_PORT").toInt()
            database = System.getenv("DB_NAME")
            user = System.getenv("DB_USER")
            password = System.getenv("DB_PASS")
        }

        pool = PgClient.pool(vertx, 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

1 participant