Re: inserting into an (Postgresql 10) interval type column using JPA

2022-03-31 Thread mkr...@trialfire.com
For reference I'm attaching my custom binding in case anyone runs into this in the future. package storage.jooq.bindings; import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.sql.Types; import java.util.Objects; import org.jooq.Binding; import

Re: inserting into an (Postgresql 10) interval type column using JPA

2022-03-31 Thread Max Kremer
The custom binding did the trick. As always you are The Man Lukas! Thanks again Regards, Max ᐧ On Thu, Mar 31, 2022 at 7:24 AM Lukas Eder wrote: > I was assuming you would be building the statement by hand. Otherwise, > just use a converter or a binding in your code generator > > On Thu,

Re: inserting into an (Postgresql 10) interval type column using JPA

2022-03-31 Thread Lukas Eder
I was assuming you would be building the statement by hand. Otherwise, just use a converter or a binding in your code generator On Thu, Mar 31, 2022 at 3:20 PM Max Kremer wrote: > > Hi Lukas, > >Where would I be able to do "CAST(? AS INTERVAL)"? I'm using JPA > with @column annotation, not

Re: inserting into an (Postgresql 10) interval type column using JPA

2022-03-31 Thread Max Kremer
Hi Lukas, Where would I be able to do "CAST(? AS INTERVAL)"? I'm using JPA with @column annotation, not building the insert statement by hand, so I;m not sure where to perform the cast. ᐧ On Thu, Mar 31, 2022 at 12:38 AM Lukas Eder wrote: > Thanks for your message. > > What have you

Re: inserting into an (Postgresql 10) interval type column using JPA

2022-03-31 Thread Lukas Eder
Thanks for your message. What have you tried, specifically? Did CAST(? AS INTERVAL) not work? Have you considered using a custom data type binding to manually bind your String value to the JDBC API? https://www.jooq.org/doc/latest/manual/code-generation/custom-data-type-bindings/ On Wed, Mar 30,