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
If we use a "baseMapper" class that the only method called is a "@BeforeMapping", than a implementation class is generated without the proper import. This issue was tested at versions: "1.4.2.final" and "1.5.0.RC1"
If we use any of regular(no "BeforeMapping") methods from baseMapper the important is added to the generated class.
public class BaseMapper {
private BaseMapper() { }
public static String mapUuidToString(UUID uuid) {
return uuid == null ? null : uuid.toString();
}
@BeforeMapping
public static <T, D> List<D> handleNullLists(Iterable<T> source) {
return source == null ? new ArrayList() : null;
}
}
The code below generates a no working implementation class, since a import to BaseMapper is missing:
Thank you for the bug report.
After looking into this I noticed it only surfaces when also using the "spring" componentModel.
PR is on the way to get this fixed.
If we use a "baseMapper" class that the only method called is a "@BeforeMapping", than a implementation class is generated without the proper import. This issue was tested at versions: "1.4.2.final" and "1.5.0.RC1"
If we use any of regular(no "BeforeMapping") methods from baseMapper the important is added to the generated class.
The code below generates a no working implementation class, since a import to
BaseMapper
is missing:The code below generates a working implementation class, since we are also using the
mapUuidToString
method from theBaseMapper
:The text was updated successfully, but these errors were encountered: