The ABCDto
@Getter
@RequiredArgsConstructor
@AllArgsConstructor
public class ABCDto
{
private String identification;
private String orderIdentification;
The ABCEntity:
@Entity(name = "")
@Table(name = "")
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class ABCEntity
{
@Id
private String identification;
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
@JoinColumn(name = "orderIdentification", referencedColumnName = "identification")
private OrderEntity orderIdentification;
The OrderEntity:
@Entity(name = "")
@Table(name = "")
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class OrderEntity
{
@Id
private String identification;
...
My MapperInterface:
@Mapper
public interface ABCMapper
{
@Mapping(target = "orderIdentification", source = "orderIdentification.identification")
ABCDto toABC(ABCEntity abcEntity);
The error:
No property named "orderIdentification.identification" exists in source parameter(s). Type "ABCEntity" has no properties.