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
Hello I trying to make some tests with Selma, but unfortunately its not working to my extended interfaces with generic methods.
Here is some code:
public interface AbstractMapper<SOURCE extends AbstractDomain, TARGET extends AbstractDomain> {
TARGET copyProperties(SOURCE source, TARGET target);
List<SOURCE> copyPropertiesList(List<SOURCE> sources, List<SOURCE> targets);
TARGET copyProperties(SOURCE source);
}
@Mapper(withCyclicMapping = true, withCustom = UserMapper.class)
public interface UserMapper extends AbstractMapper<User, UserEntity> {
UserMapper INSTANCE = Selma.builder(UserMapper.class).build();
}
@Mapper(
withCyclicMapping = true,
withCustomFields = {
@Field(value = "user", withCustom = UserMapper.class) })
public interface RegraValorMapper
extends AbstractMapper<RegraValor, RegraValorEntity> {
RegraValorMapper INSTANCE = Selma.builder(RegraValorMapper.class).build();
}
//Classes
@Entity
@Table(name = "TB_REGRA_VALOR")
@NamedQuery(
name = "RegraValorEntity.findAll",
query = "SELECT r FROM RegraValorEntity r")
public class RegraValorEntity extends RegraValor {
/**
*
*/
private static final long serialVersionUID = -11198378234826917L;
public RegraValorEntity() {
}
public RegraValorEntity(RegraValorUi ui) {
super(ui);
}
@Column(name = "VL_REGRA_VALOR")
public BigDecimal getValor() {
return super.getValor();
}
// bi-directional many-to-one association to RegraOperation
@ManyToOne(
fetch = FetchType.LAZY,
targetEntity = RegraOperationEntity.class)
@JoinColumn(name = "ID_REGRA_OPERATION")
public RegraOperation getRegraOperation() {
return super.getRegraOperation();
}
@Override
protected void copyProperties(AbstractDomain abstractDomain) {
RegraValorMapper.INSTANCE
.copyProperties((RegraValorUi) abstractDomain, this);
}
}
public abstract class RegraValor extends AbstractDomain {
private static final long serialVersionUID = 1L;
private BigDecimal valor;
private RegraOperation regraOperation;
public RegraValor() {
}
public RegraValor(RegraValor entity) {
super(entity);
}
public BigDecimal getValor() {
return this.valor;
}
public void setValor(BigDecimal vlRegraValor) {
this.valor = vlRegraValor;
}
public RegraOperation getRegraOperation() {
return this.regraOperation;
}
public void setRegraOperation(RegraOperation regraOperation) {
this.regraOperation = regraOperation;
}
}
Error message:
ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project CoParticipacaoJPA: Compilation failure
[ERROR] /home/eapereira/desenv/git-home/coparticipacao/CoParticipacaoJPA/src/br/com/spread/qualicorp/wso2/coparticipacao/domain/mapper/entity/UserMapper.java:[15,8] No valid mapping method found in custom selma class br.com.spread.qualicorp.wso2.coparticipacao.domain.mapper.entity.UserMapper\n A custom mapping method is public and returns a type not void, it takes one parameter or more if you specified datasource.
[ERROR] -> [Help 1]
The text was updated successfully, but these errors were encountered:
Hello I trying to make some tests with Selma, but unfortunately its not working to my extended interfaces with generic methods.
Here is some code:
Error message:
The text was updated successfully, but these errors were encountered: