Closed qmdx closed 6 years ago
逻辑删除的视频能不能换个清楚一点的,上面的字什么都看不到。
同一个主键,插入两次如何处理
@xzsanmm 类User对象属性office指向类Office. 以前用mybatis,写sql:select a.id,a.office_id as office.id ,o.name as office.name from user a left join office o on a.office_id=o.id 通过该sql,可以在返回的user对象中获取office对象(id和name属性有值),一个查询就可以。 在plus中,好像就直接用officeId的属性来指明外部对象关联情况(查看了很多例子,sql查询只返回user对象,然后遍历user对象,通过officeId获取office对象再赋值) 在sql中,basemapper默认实现的select*函数中,该如何配置相关信息,以到达类似上面sql语句效果(不用另外编写xml文件中的sql语句,而是通过annonation的配置,获取在xml中额外配置部分语句)。
可以使用 在mapper中的定义一个 resultMap , 级联的表 可以用 collection 关键字
List
@wangyijue 这个才是重点 Parameter 'type' not found.
yml文件有误吧 为什么db-config节点没了
这个以后还要维护吗
还是3.0 就是终结版了
sql-injector: com.baomidou.mybatisplus.extension.injector.LogicSqlInjector 3.0 这个在spring boot 中直接配置就报错啊,该怎么配置啊
@kallima55206086 2.3 是 2.x 的终结, 3.x 是新的开始 ,你的错请看我们的 sb demo 3 的注入方式不是这样的
@darren-wang 你这个问题 其实可以直接重写他的生成代码
/* 前缀处理 / String property = fieldInfo.getProperty(); Class propertyType = fieldInfo.getPropertyType(); property = StringUtils.removeIsPrefixIfBoolean(property, propertyType);
- 去除boolean类型is开头的字符串
- @param propertyName 字段名
- @param propertyType 字段类型
- @return */ public static String removeIsPrefixIfBoolean(String propertyName, Class propertyType)这个能不能配置啊别强制转 这个强制去除很头疼啊,新版本解决了吗。或者老铁们有什么优雅的方法吗?
提问方式参考: https://github.com/baomidou/mybatis-plus/issues/332
不符合一律不予回复!!