Skip to content

InfluxDBResultMapper doesnt call POJO setter #670

@sjoshid

Description

@sjoshid

It is puzzling that InfluxDBResultMapper doesnt call POJO setter.
My POJO looks like

class MyPOJO
{
    @Column(name = "time")
    private Instant time;

    //getter ignored
    public void setTime(Instant time) {  
        this.time = time.truncatedTo(ChronoUnit.SECONDS);
    }
}

Then I do something like

    final List<MyPOJO> resultEvents =  resultMapper.toPOJO(result, MyPOJO.class);

Assumption is setTime would be called for each point fetched. But it doesnt. It somehow bypasses it. time is private. Reflection in play here?
Expectation is that if I remove my setter, toPOJO call would fail. But it doesnt.

I have tried 2.17, 2.7 and 2.9 versions.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy