I see now. I'm assuming the @Column annotation is the JPA @Column annotation? The DefaultRecordMapper rule is that if JPA annotations are present, then *only* annotated columns are mapped. There's a feature request to make these annotations optional: https://github.com/jOOQ/jOOQ/issues/4586
I hope this helps Lukas On Fri, Feb 9, 2024 at 8:51 AM YANA <[email protected]> wrote: > Maybe better was to write it with obtaining list value like this (just > put result to list value nothing changed) > List<NgxChartSeries> list = jooq.select(TRANSACTIONS.ID_ACQUIRER.as("nam"), > TRANSACTIONS.AMOUNT, day(TRANSACTIONS.TRANSACTION_DATE).as("day")).from( > TRANSACTIONS) > .fetchInto(NgxChartSeries.class); > пятница, 9 февраля 2024 г. в 08:40:47 UTC+1, YANA: > >> 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/40b301b6-bbd7-4710-aca3-a074ab0417f5n%40googlegroups.com > <https://groups.google.com/d/msgid/jooq-user/40b301b6-bbd7-4710-aca3-a074ab0417f5n%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/CAB4ELO6E%3Dg9S2tR%2BM6T1_6QuYZF2tUEdneD%2BGteYGW0hrrqfGQ%40mail.gmail.com.
