You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Configuration
@RequiredArgsConstructor
public class MyAppConfig extends AbstractR2dbcConfiguration {
private final ConnectionFactory connectionFactory;
@Override
public ConnectionFactory connectionFactory() {
return connectionFactory;
}
@Override
@Bean
public R2dbcCustomConversions r2dbcCustomConversions() {
List<Converter<?, ?>> converterList = new ArrayList<Converter<?, ?>>();
converterList.add(new AttrValueConverter());
return new R2dbcCustomConversions(getStoreConversions(), converterList);
}
}
Attr
@Data
@EqualsAndHashCode(callSuper = true)
@Table
public class Attr extends BaseEntity implements Serializable{
private static final long serialVersionUID = 1L;
/**
* attr id
*/
private Long attrId;
private AttrValue attrValues;
...
AttrValue
@Data
@EqualsAndHashCode(callSuper = true)
@Table
public class AttrValue extends BaseEntity implements Serializable{
private static final long serialVersionUID = 1L;
...
}
AttrRepository
public interface AttrRepository extends R2dbcRepository<Attr, Long> {
@Query("select a.*,av.* from attr a join attr_value av on a.attr_id = av.attr_id")
Flux<Attr> findAttrAndValues();
}
The text was updated successfully, but these errors were encountered:
wang-xiaowu
changed the title
@ReadingConverter is not work
@ReadingConverter is not work,and does R2DBC have the right way to implement one to many?
Nov 6, 2021
List<AttrValue> attrValues = source.get("attrValues", List.class); won't work because R2DBC doesn't support embedded lists. Closing this a duplicate of #356.
The text was updated successfully, but these errors were encountered: