Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Mapping error between query result and JavaBean #222

Open
qsimu opened this issue Dec 28, 2021 · 1 comment
Open

Mapping error between query result and JavaBean #222

qsimu opened this issue Dec 28, 2021 · 1 comment

Comments

@qsimu
Copy link

qsimu commented Dec 28, 2021

`

@Table("pre_webset")
public class Webset {

    @Id
    @Column("`key`")
    private String key;

    @Column("desc")
    @ApiModelProperty(value = "备注")
    private String desc;

    @Column("val")
    private String val;

}

`

`

public interface WebsetRepository extends ReactiveCrudRepository<Webset, String> {

}

`

`

    @Resource
    WebsetRepository websetRepository;

    @Test
    void t3(){
        Webset isOpenFeeds = websetRepository.findById("is_open_feeds").block();
        System.out.println(isOpenFeeds);
    }

`

println result
Webset(key=null, desc=信息流刷新开关, val=1)

@BarracudaX
Copy link

BarracudaX commented Jan 26, 2022

Maybe backticks around the key string is the cause?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants