SimpleFlatMapper icon indicating copy to clipboard operation
SimpleFlatMapper copied to clipboard

CsvWriter not find eligible property

Open cn-src opened this issue 4 years ago • 1 comments

simpleflatmapper.version:8.2.3

import lombok.Data;
import org.simpleflatmapper.map.annotation.Column;

@Data
public class GenGrid {
    @Column("gird_x")
    private int gridX;
    @Column("gird_y")
    private int gridY;
}
 CsvWriter<GenGrid> writer = CsvWriter.from(GenGrid.class)
                    .to(appendable);
            GenGrid value = new GenGrid();
            writer.append(value);

throw:

org.simpleflatmapper.map.MapperBuildingException: Could not find eligible property for 'grid_y'

cn-src avatar Jun 24 '20 01:06 cn-src

sorry been late on that, is there a setter or a constructor that set gridY? I assume lombok is doing that? could you send the .class generated for GenGrid? also there no need for the @Column annotation

arnaudroger avatar Oct 03 '20 10:10 arnaudroger