Thank you I figured it out eventually. Escaping the spaces was key. Inline response.
On Tue, Apr 3, 2018 at 1:50 AM, Lukas Eder <[email protected]> wrote: > Hi Samir, > > The regex you should use is this: > > <types>(?i:timestamp\ with\ time\ zone)</types> > > See: https://github.com/jOOQ/jOOQ/issues/4691 > > While there's certainly room for arguing whether the status quo > constitutes reasonable behaviour, the problem lies in the fact that prior > to jOOQ 3.9 when jOOQ formally started supporting JSR-310 (and thus > TIMESTAMP WITH TIME ZONE), the type simply wasn't supported correctly by > jOOQ. While the code generator generated java.sql.Timestamp type > information on your generated classes, the behaviour was in fact that of > TIMESTAMP WITHOUT TIME ZONE. In case your time zones differed between > server and client, you would have gotten wrong results. > That's fair enough but I would like to get a clearer picture of what is and isn't converted to Java 8 object. for example, why is the behavior for datetime with timezone not consistent with timestamp with timezone. If i set the flag javaTimeTypes to false I would expect that no java 8 time object would be used. If that's not the case.. (which is a judgement call on your part that you're completely entitled to do) but I would like to know though which objects are used and not used when we set that flag to false. My take is if we set javaTimeTypes = false then my expectations was that any class in java.time would not be used, if that's not the case we should document that somewhere. Appreciate the help either ways. Thank you much. That unblocked me. > > I hope this helps, > Lukas > > 2018-04-02 22:54 GMT+02:00 Samir Faci <[email protected]>: > >> Actually, I found another thread that's referring to the exact issue I'm >> running into. >> >> https://groups.google.com/forum/#!topic/jooq-user/qawy4ijgHqk >> >> I tried the regex specified and that didn't work for me. >> >> >> From what I can see something along these lines should work based on >> Lukas' suggestion. Though I'm still getting a OffsetDateTime being >> generated. >> >> >> <forcedTypes> >> >> <forcedType> >> <name>TIMESTAMP</name> >> <!-- >> <expression>created_on|last_modified_on|fax_response_time|effective_date|assigned_on|transaction_posted_date|transaction_created_date|transaction_deposit_date|time_stamp|created_date</expression> >> --> >> <types>(?i:timestamp with time zone)</types> >> </forcedType> >> </forcedTypes> >> >> >> >> >> >> My take is that if we are forcing the code generation to NOT use Java 8 >> date/time objects then we should not have the code generate any objects >> that imports java.time which should include the OffsetDateTime. >> >> I'm trying to understand if the JavaTimeType is deprecated or if there is >> only a certain subset of classes that are supported. >> >> >> >> >> On Mon, Apr 2, 2018 at 10:18 AM, Samir Faci <[email protected]> wrote: >> >>> I upgrade our internal setup to use Jooq 3.10.6 and now I'm getting a >>> different behavior for the date and time fields. >>> >>> >>> What used to be a java.sql.timestamp is now being generated >>> as OffsetDateTime. >>> >>> I'm going from 3.9.0 to 3.10.6. >>> >>> The previous config was as follows. >>> >>> <generate> >>> <pojos>true</pojos> >>> <pojosEqualsAndHashCode>true</pojosEqualsAndHashCode> >>> <interfaces>true</interfaces> >>> <!-- Brings in JSR-308 adding compile time checks for @NotNull >>> and @Size checks --> >>> <validationAnnotations>true</validationAnnotations> >>> <!-- Gives preference for java.time rather then relying on >>> java.sql.timestamp breaking change --> >>> <!-- We really should take the time to migrate to this feature. >>> -->* <javaTimeTypes>false</javaTimeTypes> >>> * </generate> >>> >>> >>> >>> My understand was that *javaTimeTypes *should turn off any java 8 date >>> times which includes OffsetDateTime. >>> >>> >>> >>> >>> -- >>> Thank you >>> Samir Faci >>> https://keybase.io/csgeek >>> >> >> >> >> -- >> Thank you >> Samir Faci >> https://keybase.io/csgeek >> >> -- >> 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. > -- Thank you Samir Faci https://keybase.io/csgeek -- 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.
