【Lazy ORM】upsert 使用

Gitee
版本信息 1.2.2-JDK17-SNAPSHOT

upsert使用


    public void upsert() {
        LazyUserTest lazyUserTest = new LazyUserTest();
        lazyUserTest.setUsername("紧");
        lazyUserTest.setSex(LazyUserTest.Sex.MAN);
        lazyUserTest.setId(12L);
        lazyLambdaStream.upsert(lazyUserTest);
        // insert into lazy_user_test (id,username,birthday,sex,age,is_deleted) VALUES (12,'紧',null,'MAN',null,null)  ON DUPLICATE KEY UPDATE username=values (username),birthday=values (birthday),sex=values (sex),age=values (age),is_deleted=values (is_deleted)
    }
    

你可能感兴趣的:(Lazy,ORM,开发语言,Lazy,ORM)