Found the problem, i was missing the constructor which set the DSLContext in the class which was performing the query. I would expect that a missing constructor would have set the context to Null, but that wasnt the case. May be there is some gap in my understanding of Guice.
Thanks, Ganesh On Mon, Feb 25, 2019 at 8:53 PM Ganesh <[email protected]> wrote: > Both of the following return Null. > > dslContext.insertInto(DSL.table("tableName")) // tableName is a String > argument. > dslContext.insertInto(jooq.tables.TableName) // argument of type > jooq.tables.TableName > > I am using Guice for dependency injection and I checked that all > dependencies to the best of my knowledge are injected properly, but looks > like I am still missing something. > > Thanks, > Ganesh > > On Mon, Feb 25, 2019 at 5:32 PM Ganesh <[email protected]> wrote: > >> Followed https://groups.google.com/forum/#!topic/jooq-user/fOsaaZq44Ac, >> >> dslContext.insertInto returns Null even when I use Record objects. >> >> Thanks, >> Ganesh >> >> On Mon, Feb 25, 2019 at 5:23 PM Ganesh <[email protected]> >> wrote: >> >>> I am using the following packages, >>> >>> Jooq = 3.11; >>> Jooq-meta = 3.11; >>> Jooq-codegen = 3.11; >>> PostgresqlJDBCClient = 42.x; >>> >>> Thanks, >>> Ganesh >>> >>> On Mon, Feb 25, 2019 at 5:15 PM Ganesh <[email protected]> >>> wrote: >>> >>>> Hello Jooq-Users, >>>> >>>> I am trying to insert into a PostGresDB through Junit following the >>>> sample code below. >>>> >>>> dslContext.insertInto(...).values(...). >>>> >>>> The issue is dslContext.insertInto(...) returns NULL and fails my test. >>>> Any suggestions what i am missing here ? >>>> >>>> I followed >>>> https://www.jooq.org/doc/3.11/manual/sql-building/sql-statements/insert-statement/insert-values/ >>>> as the reference. >>>> >>>> Thanks, >>>> Ganesh >>>> >>> -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
