Okay
Generally in my code it looks very close to this query (I tried to simplify
query to show the main idea):
jooq.select(TRANSACTIONS.ID_ACQUIRER.as("nam"), TRANSACTIONS.AMOUNT, day(
TRANSACTIONS.TRANSACTION_DATE).as("day"))
.from(TRANSACTIONS)
.fetchInto(NgxChartSeries.class);
Fetch object below:
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Getter(AccessLevel.PUBLIC)
@Setter(AccessLevel.PUBLIC)
public class NgxChartSeries {
@Column(name="nam")
@JsonProperty("nam")
private String name;
@Column(name="val")
@JsonProperty("val")
private BigDecimal value;
@JsonProperty("day")
private Integer day;
}
I hope it will help you, but If I have to add some info - please, give me
know.
Thanks in advance!
пятница, 9 февраля 2024 г. в 08:14:41 UTC+1, [email protected]:
> Thanks for your message.
>
> Can you show the FetchObject class? You did describe it, but perhaps you
> omitted some important information. Also, your query doesn't compile, so it
> seems you may have simplified it a bit too much. Can you show a complete
> example that doesn't work for you, which can be reproduced?
>
> On Thu, Feb 8, 2024 at 8:05 PM YANA <[email protected]> wrote:
>
>> Hi! After refreshing jooq to 3.19.3 faced with problem with *day
>> extraction* from table field, like this:
>> dslContext.select(table.name,day(table.date).as("day").from(table)
>> .fetchInto(FetchObject.class);
>> *FetchObject *=>* day* field is *Integer *type;
>> *table *=> *date *field is *TableField<Record, LocalDateTime>* type;
>> As result *FetchObject*.*day *value* is always null after fetchInto*
>> Also I tried such syntax: extract(table.DATE, DatePart.DAY) , but result
>> was the same.
>>
>> Can somebody clarify, if it really jooq release related problem? Looks
>> like this... (but maybe also my mistake somewhere)
>>
>> --
>> 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].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jooq-user/5db1e6fe-178b-4390-b8f7-8db250e85fcbn%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/jooq-user/5db1e6fe-178b-4390-b8f7-8db250e85fcbn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jooq-user/95cea20f-313c-4f34-a723-c9656ad47a48n%40googlegroups.com.