Hi Robert,
The org.jooq.Table type contains a with(String) method that can be used for
passing T-SQL hints:
http://www.jooq.org/javadoc/latest/org/jooq/Table.html#with-java.lang.String-
So change your code to:
return getCreate()
.select()
.from(CUSTOMER.with("NOLOCK"))
.fetchInto(CustomerDto.class);
Hope this helps,
Lukas
2015-07-24 14:38 GMT+02:00 <[email protected]>:
> How do I add SQL Server's NOLOCK using JOOQ? I know it is not the best
> practice, but it works in my situation.
>
> return getCreate()
>
> .select()
>
> .from(CUSTOMER)
>
> .fetchInto(CustomerDto.class);
>
>
> select * from customer with (NOLOCK )
>
> --
> 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.
>
--
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.